Instructions to use Qwen/Qwen3.5-397B-A17B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen3.5-397B-A17B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.5-397B-A17B") 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("Qwen/Qwen3.5-397B-A17B") model = AutoModelForMultimodalLM.from_pretrained("Qwen/Qwen3.5-397B-A17B", 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]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qwen/Qwen3.5-397B-A17B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen3.5-397B-A17B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.5-397B-A17B", "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/Qwen/Qwen3.5-397B-A17B
- SGLang
How to use Qwen/Qwen3.5-397B-A17B 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 "Qwen/Qwen3.5-397B-A17B" \ --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": "Qwen/Qwen3.5-397B-A17B", "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 "Qwen/Qwen3.5-397B-A17B" \ --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": "Qwen/Qwen3.5-397B-A17B", "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 Qwen/Qwen3.5-397B-A17B with Docker Model Runner:
docker model run hf.co/Qwen/Qwen3.5-397B-A17B
Commit History
7 days ago
-
Add IFBench evaluation result
Verified signature# Add IFBench evaluation result ## Summary This PR adds the IFBench score reported for `Qwen/Qwen3.5-397B-A17B` to `.eval_results/`, following the [Hugging Face Hub evaluation-results specification](https://huggingface.co/docs/hub/eval-results). IFBench ([allenai/IFBench_test](https://huggingface.co/datasets/allenai/IFBench_test)) is now an official Hub benchmark, with prompt-level loose accuracy as its headline metric. ## Benchmarks Added - [IFBench](https://huggingface.co/datasets/allenai/IFBench_test?eval_result=Qwen/Qwen3.5-397B-A17B&leaderboard_task_id=prompt_level_loose): 76.5 ## Source - Model card: https://huggingface.co/Qwen/Qwen3.5-397B-A17B (row: "IFBench") ## Files Added - `.eval_results/ifbench.yaml` ## Verification This score is self-reported in the source above; no verified token is provided because it was not run via HF Jobs with inspect-ai. The Hub task is prompt-level loose accuracy (0-100). If your number was computed with a different IFBench variant (stric…6c3977c
-
Update README.md
Verified signature8472618 -
fix: rename response variable to chat_response in README code example
Verified signature848662a
-
Update medical vqa score (#65)
- Update medical vqa score (c9595b053ff1a456a4be89da3a85673a20389343) Co-authored-by: Tianyi Tang <StevenTang@users.noreply.huggingface.co>60c2d3e
-
Update README.md
Verified signature98d1a50
-
add KTransformers deployment guide (#30)
- add KTransformers deployment guide (c677b81f9c6420136b0c8960e9b2ac37279d108a) Co-authored-by: unicorn chan <UnicornChan@users.noreply.huggingface.co>285b7b5
-
Update README.md
Verified signature7cad2ba -
Fix README accessibility: enable adaptive light/dark theme for tables (#8)
- Fix README accessibility: enable adaptive light/dark theme for tables (618fe4a2c3b915ecac963a3ade55c37499e07261) Co-authored-by: Ilya Pereverzin <NodeLinker@users.noreply.huggingface.co>076f1b8 -
Update README.md
Verified signature59a9aaa -
Update README.md
Verified signatureeb9e569 -
Update README.md
Verified signaturee4528a6 -
Update README.md
Verified signature0674dbe -
Upload generation_config.json
Verified signature167684e -
Update README.md
Verified signaturef34a529 -
Update tokenizer_config.json
Verified signature646a873 -
Update README.md
Verified signature60a0388 -
Update README.md
Verified signatureac720d0 -
Update README.md
Verified signature786331b -
Upload LICENSE
Verified signature7f74e13 -
Update video_preprocessor_config.json
Verified signature5ff2660 -
Update tokenizer_config.json
Verified signature5523f9e -
Update chat_template.jinja
Verified signature65e34c6 -
Update README.md
Verified signaturefe5a6d3 -
Update README.md
Verified signature0b7c9bf -
Create README.md (#1)
- Create README.md (3f23b9c321a553147e331c186ba6d26448679722) Co-authored-by: Bo Zheng <bzheng@users.noreply.huggingface.co>47a4bd1 -
Add files using upload-large-folder tool
Verified signature2e0ff47 -
Add files using upload-large-folder tool
Verified signature7090120 -
Add files using upload-large-folder tool
Verified signature556af78 -
initial commit
Verified signature5f47827