wenhuach commited on
Commit
a00e481
·
verified ·
1 Parent(s): 4286ae8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - Qwen/Qwen3.6-27B
4
+ ---
5
+ ## Model Details
6
+
7
+ This model is a int4 model with group_size 128 of [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) generated by [intel/auto-round](https://github.com/intel/auto-round). Please follow the license of the original model.
8
+
9
+ ## vllm Inference Example
10
+
11
+ ~~~bash
12
+ vllm serve Intel/Qwen3.6-27B-int4-AutoRound --port 8000 --tensor-parallel-size 1 --max-model-len 2048 --reasoning-parser qwen3 --served-model-name qwen --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'
13
+
14
+
15
+ curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d ' {
16
+ "model": "qwen",
17
+ "messages": [
18
+ {"role": "system", "content": "You are a helpful assistant."},
19
+ {"role": "user", "content": "Summarize Qwen 3.6 in one sentence."}
20
+ ],
21
+ "temperature": 1,
22
+ "max_tokens": 512
23
+ } '
24
+
25
+
26
+ ~~~
27
+
28
+
29
+
30
+ **Transformers Inference Example**
31
+
32
+ ```PYTHON
33
+ from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
34
+ model_name
35
+ model_name = "Intel/Qwen3.6-27B-int4-AutoRound"
36
+ model = Qwen3_5ForConditionalGeneration.from_pretrained(model_name, dtype="auto",
37
+ device_map="auto")
38
+ processor = AutoProcessor.from_pretrained(model_name)
39
+
40
+ messages = [
41
+ {
42
+ "role": "user",
43
+ "content": [
44
+ {
45
+ "type": "image",
46
+ "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
47
+ },
48
+ {"type": "text", "text": "Describe this image in short."},
49
+ ],
50
+ }
51
+ ]
52
+
53
+
54
+ inputs = processor.apply_chat_template(
55
+ messages,
56
+ tokenize=True,
57
+ add_generation_prompt=True,
58
+ return_dict=True,
59
+ return_tensors="pt"
60
+ )
61
+ inputs = inputs.to(model.device)
62
+
63
+
64
+ generated_ids = model.generate(**inputs, max_new_tokens=128)
65
+ generated_ids_trimmed = [
66
+ out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
67
+ ]
68
+ print(processor.batch_decode(generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0])
69
+ """
70
+ The user wants a short description of the image.
71
+
72
+ 1. **Identify the main subjects:** A young woman and a golden retriever dog.
73
+ 2. **Identify the setting:** A sandy beach with the ocean in the background. The lighting suggests sunrise or sunset (golden hour).
74
+ 3. **Identify the action:** The dog is sitting and lifting its paw to touch the woman's hand (a "high five" or "shake"). The woman is smiling and looking at the dog, holding a treat or just engaging with it.
75
+ 4. **Identify details:** The dog is wearing a
76
+ """
77
+
78
+ ```
79
+
80
+ ## Generate the Model
81
+
82
+ ```
83
+ auto-round "Qwen/Qwen3.6-27B" --output_dir "./Qwen36-int4"
84
+ ```
85
+
86
+ ## Ethical Considerations and Limitations
87
+
88
+ The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
89
+
90
+ Therefore, before deploying any applications of the model, developers should perform safety testing.
91
+
92
+ ## Caveats and Recommendations
93
+
94
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
95
+
96
+ Here are a couple of useful links to learn more about Intel's AI software:
97
+
98
+ - [Intel Neural Compressor](https://github.com/intel/neural-compressor)
99
+
100
+ ## Disclaimer
101
+
102
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
103
+
104
+ ## Cite
105
+
106
+ @article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }