Views
No views yet
1vllm 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}'
2
3
4curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d ' {
5 "model": "qwen",
6 "messages": [
7 {"role": "system", "content": "You are a helpful assistant."},
8 {"role": "user", "content": "Summarize Qwen 3.6 in one sentence."}
9 ],
10 "temperature": 1,
11 "max_tokens": 512
12 } '
13
141from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
2model_name
3model_name = "Intel/Qwen3.6-27B-int4-AutoRound"
4model = Qwen3_5ForConditionalGeneration.from_pretrained(model_name, dtype="auto",
5 device_map="auto")
6processor = AutoProcessor.from_pretrained(model_name)
7
8messages = [
9 {
10 "role": "user",
11 "content": [
12 {
13 "type": "image",
14 "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
15 },
16 {"type": "text", "text": "Describe this image in short."},
17 ],
18 }
19]
20
21
22inputs = processor.apply_chat_template(
23 messages,
24 tokenize=True,
25 add_generation_prompt=True,
26 return_dict=True,
27 return_tensors="pt"
28)
29inputs = inputs.to(model.device)
30
31
32generated_ids = model.generate(**inputs, max_new_tokens=128)
33generated_ids_trimmed = [
34 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
35]
36print(processor.batch_decode(generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0])
37"""
38The user wants a short description of the image.
39
401. **Identify the main subjects:** A young woman and a golden retriever dog.
412. **Identify the setting:** A sandy beach with the ocean in the background. The lighting suggests sunrise or sunset (golden hour).
423. **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.
434. **Identify details:** The dog is wearing a
44"""
45auto-round "Qwen/Qwen3.6-27B" --output_dir "./Qwen36-int4"