Instructions to use intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound") model = AutoModelForMultimodalLM.from_pretrained("intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound
- SGLang
How to use intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-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.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound with Docker Model Runner:
docker model run hf.co/intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound
Model Details
This model is an MXFP4 (mixed MXFP4 experts / MXFP8 linear) model of Qwen/Qwen3.8-Flash-Next generated by intel/auto-round using RTN. Please follow the license of the original model.
- Quantized (MXFP4): routed experts
- Kept in BF16: attention, router, embeddings, lm_head, vision tower, shared expert, MTP, PLE table
How to Use
Environment
uv pip install --index-strategy unsafe-best-match \
--extra-index-url https://wheels.vllm.ai/9815732c16ca076c60b65fccd787167d6a9c5328/cu130 \
"vllm==0.29.1rc1.dev528+g9815732c1"
python - <<'PY'
from importlib.util import find_spec
from pathlib import Path
import subprocess
from huggingface_hub import hf_hub_download
spec = find_spec("vllm")
if spec is None or spec.origin is None:
raise RuntimeError("Install the pinned vLLM build first")
root = Path(spec.origin).parent.parent
for filename in ['patches/qwen38fn-ct-ple-dev528.patch']:
patch = hf_hub_download("intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound", filename, revision="415d9ae4aa48e6067a3f0d2ed5e10a932e4f123e")
command = ["patch", "--batch", "--fuzz=0", "-p1", "-d", str(root), "-i", patch]
reverse = subprocess.run(command + ["--reverse", "--dry-run"], capture_output=True)
if reverse.returncode == 0:
print(filename + ": already applied")
continue
subprocess.run(command + ["--forward", "--dry-run"], check=True)
subprocess.run(command + ["--forward"], check=True)
PY
vLLM Usage
vllm serve intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound \
--reasoning-parser qwen3
Evaluation
| Benchmark | BF16 | MXFP4 | Recovery |
|---|---|---|---|
| GSM8K | 96.74 | 96.66 | 99.92% |
| MMLU | 86.52 | 86.43 | 99.90% |
| PIQA | 81.94 | 81.45 | 99.40% |
| HellaSwag | 69.27 | 68.32 | 98.63% |
| Average | 83.62 | 83.22 | 99.52% |
Generate the Model
auto-round \
--model_name Qwen/Qwen3.8-Flash-Next \
--model_free \
--scheme MXFP8 \
--ignore_layers "visual,lm_head,embed_tokens,mlp.gate,mlp.shared_expert_gate,in_proj_a,in_proj_b,block_inject_weight,ple,mtp,hyper_connection,indexer,shared_expert" \
--layer_config "{mlp.experts:{bits:4,data_type:mx_fp}}" \
--format llm_compressor \
--output_dir Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound
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: Lv, Kaokao kaokao.lv@intel.com
- Downloads last month
- 340
Model tree for intel-ai/Qwen3.8-Flash-Next-MXFP4-BF16SharedExperts-CT-AutoRound
Base model
Qwen/Qwen3.8-Flash-Next