Model Details
This model is a int4 model with group_size 128 of Qwen/Qwen3.5-397B-A17B generated by intel/auto-round. Please follow the license of the original model.
The model is quantized via RTN mode
vllm Infernece Example
pip install git+https://github.com/vllm-project/vllm.git@main
pip install git+https://github.com/huggingface/transformers.git
vllm serve Intel/Qwen3.5-397B-A17B-int4-AutoRound --port 8000 --tensor-parallel-size 1 --max-model-len 2048 --reasoning-parser qwen3 --served-model-name qwen
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d ' {
"model": "qwen",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Summarize Qwen 3.5 in one sentence."}
],
"temperature": 1,
"max_tokens": 512
} '
Transformers Inference
Transformers v5.2.0
auto-round and This pr is required https://github.com/intel/auto-round/pull/1476
from transformers import AutoProcessor, Qwen3_5MoeForConditionalGeneration
model_name = "Intel/Qwen3.5-397B-A17B-int4-AutoRound"
model = Qwen3_5MoeForConditionalGeneration.from_pretrained(model_name, dtype="auto",
device_map="auto")
processor = AutoProcessor.from_pretrained(model_name)
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
},
{"type": "text", "text": "Describe this image in short."},
],
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
)
inputs = inputs.to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
print(processor.batch_decode(generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0])
Generate the Model
This pr is required https://github.com/intel/auto-round/pull/1476
auto-round "Qwen/Qwen3.5-397B-A17B" --iters 0 --disable_opt_rtn --output_dir "./Qwen35-int4" --ignore_layers shared_expert
Ethical Considerations and Limitations
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.
Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
Here are a couple of useful links to learn more about Intel's AI software:
Disclaimer
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.
Cite
@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} }
arxiv [github](
- Downloads last month
- 4,003
Model tree for Intel/Qwen3.5-397B-A17B-int4-AutoRound
Base model
Qwen/Qwen3.5-397B-A17B