CoolFace
Modelpublic

Intel/Qwen3.5-122B-A10B-int4-AutoRound

sourceHugging Faceupdated 5mo agoView on Hugging Face
49likes300kdownloads
Model Card

Model Details

This model is an int4 model with group_size 128 of Qwen/Qwen3.5-122B-A10B generated by intel/auto-round. Please follow the license of the original model.

The main branch provides the tuned quantized model, and revision 3f4ba63 corresponds to the RTN version. In general, the tuned version is preferred; however, it has not been validated for this particular model.

vllm Infernece Example

~~~bash pip install git+https://github.com/vllm-project/vllm.git@main

pip install git+https://github.com/huggingface/transformers.git ~~~

~~~bash vllm serve Intel/Qwen3.5-122B-A10B-int4-AutoRound --port 8000 --tensor-parallel-size 1 --max-model-len 2048 --reasoning-parser qwen3 --served-model-name qwen ~~~

~~~bash 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

~~~python from transformers import AutoProcessor, Qwen35MoeForConditionalGeneration modelname = "Intel/Qwen3.5-122B-A10B-int4-AutoRound"

model = Qwen35MoeForConditionalGeneration.frompretrained(modelname, dtype="auto", devicemap="auto") processor = AutoProcessor.frompretrained(modelname)

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.applychattemplate( messages, tokenize=True, addgenerationprompt=True, returndict=True, returntensors="pt" ) inputs = inputs.to(model.device)

generatedids = model.generate(**inputs, maxnewtokens=128) generatedidstrimmed = [ outids[len(inids):] for inids, outids in zip(inputs.inputids, generatedids) ] print(processor.batchdecode(generatedidstrimmed, skipspecialtokens=True, cleanuptokenization_spaces=False)[0])

~~~

Generate the Model

This pr is required https://github.com/intel/auto-round/pull/1476

Tuning version

~~~bash auto-round "Qwen/Qwen3.5-122B-A10B" --outputdir "./Qwen35-int4" --ignorelayers shared_expert ~~~

RTN version

~~~bash auto-round "Qwen/Qwen3.5-122B-A10B" --iters 0 --disableoptrtn --outputdir "./Qwen35-int4" --ignorelayers 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