Instructions to use intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound") model = AutoModelForMultimodalLM.from_pretrained("intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound
- SGLang
How to use intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound with Docker Model Runner:
docker model run hf.co/intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound
Model Details
This model is an NVFP4+ (also called uNVFP4) model of Qwen/Qwen3.5-397B-A17B generated by intel/auto-round using model-free optimized RTN. Please follow the license of the original model.
NVFP4+ uses FP4 E2M1 elements for weights and activations, an FP8 E5M3 block scale with group size 16, and no tensor-wise global scale. Activations use dynamic per-block scaling.
- Quantized (NVFP4+): all Linear layers in
model.language_model.layersandmtp.layers, including routed experts, shared experts, attention projections, linear-attention projections, and the MTP FC/attention layers - Kept in BF16: router (
mlp.gate),mlp.shared_expert_gate,in_proj_a/in_proj_b,lm_head, embeddings, and the vision tower - Kept in F32:
linear_attn.norm - Not quantized: KV cache and attention softmax / SDPA
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3.5-397B-A17B |
| Quantization | NVFP4+ W4A4 |
| Weight / activation element | FP4 E2M1 |
| Block scale | FP8 E5M3 |
| Group size | 16 |
| Tensor-wise global scale | None |
| Quantization algorithm | Model-free OPT-RTN |
| AutoRound version | 0.16.0 |
| Quantized modules | 94,079 |
| Quantized parameters | ~400.75B |
| BF16/F32 parameters | ~2.64B |
| Release size | ~214.9 GiB |
How to Use
Environment
The checkpoint uses the auto_round:llm_compressor_nvfp4_e5m3 packing format. Use an inference stack whose compressed-tensors / vLLM build supports NVFP4+ with E5M3 block scales; the checkpoint was produced with auto-round 0.16.0.
vLLM Usage
vllm serve intel-ai/Qwen3.5-397B-A17B-NVFP4-Plus-AutoRound
Evaluation
Recovery is the quantized score divided by the BF16 baseline.
| Benchmark | BF16 | NVFP4+ | Recovery |
|---|---|---|---|
| GSM8K | 97.65 | 97.12 | 99.46% |
| MMLU | 88.56 | 87.90 | 99.25% |
| PIQA | 83.03 | 82.48 | 99.34% |
| HellaSwag | 74.23 | 72.67 | 97.90% |
| Average | 85.87 | 85.04 | 99.04% |
Average loss versus BF16: 0.96%.
Generate the Model
auto-round Qwen/Qwen3.5-397B-A17B \
--model_free \
--scheme NVFP4_E5M3 \
--ignore_layers "visual,lm_head,embed_tokens,mlp.gate,mlp.shared_expert_gate,in_proj_a,in_proj_b" \
--format auto_round \
--output_dir ./Qwen3.5-397B-A17B-NVFP4-Plus
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}
}
Signed-off-by: Kaokao, Lv kaokao.lv@intel.com
- Downloads last month
- 31
Model tree for intel-ai/Qwen3.5-397B-A17B-NVFP4-AutoRound
Base model
Qwen/Qwen3.5-397B-A17B