Instructions to use QuantTrio/Qwen3.5-35B-A3B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/Qwen3.5-35B-A3B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="QuantTrio/Qwen3.5-35B-A3B-AWQ") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("QuantTrio/Qwen3.5-35B-A3B-AWQ") model = AutoModelForMultimodalLM.from_pretrained("QuantTrio/Qwen3.5-35B-A3B-AWQ") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuantTrio/Qwen3.5-35B-A3B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/Qwen3.5-35B-A3B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/Qwen3.5-35B-A3B-AWQ", "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/QuantTrio/Qwen3.5-35B-A3B-AWQ
- SGLang
How to use QuantTrio/Qwen3.5-35B-A3B-AWQ 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 "QuantTrio/Qwen3.5-35B-A3B-AWQ" \ --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": "QuantTrio/Qwen3.5-35B-A3B-AWQ", "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 "QuantTrio/Qwen3.5-35B-A3B-AWQ" \ --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": "QuantTrio/Qwen3.5-35B-A3B-AWQ", "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 QuantTrio/Qwen3.5-35B-A3B-AWQ with Docker Model Runner:
docker model run hf.co/QuantTrio/Qwen3.5-35B-A3B-AWQ
Update config.json
Browse files- config.json +2 -2
config.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
"attention_bias": false,
|
| 10 |
"attention_dropout": 0.0,
|
| 11 |
"attn_output_gate": true,
|
| 12 |
-
"dtype": "
|
| 13 |
"eos_token_id": 248044,
|
| 14 |
"full_attention_interval": 4,
|
| 15 |
"head_dim": 256,
|
|
@@ -96,6 +96,7 @@
|
|
| 96 |
"transformers_version": "4.57.0.dev0",
|
| 97 |
"video_token_id": 248057,
|
| 98 |
"vision_config": {
|
|
|
|
| 99 |
"deepstack_visual_indexes": [],
|
| 100 |
"depth": 27,
|
| 101 |
"hidden_act": "gelu_pytorch_tanh",
|
|
@@ -113,7 +114,6 @@
|
|
| 113 |
},
|
| 114 |
"vision_end_token_id": 248054,
|
| 115 |
"vision_start_token_id": 248053,
|
| 116 |
-
"torch_dtype": "bfloat16",
|
| 117 |
"quantization_config": {
|
| 118 |
"quant_method": "awq",
|
| 119 |
"bits": 4,
|
|
|
|
| 9 |
"attention_bias": false,
|
| 10 |
"attention_dropout": 0.0,
|
| 11 |
"attn_output_gate": true,
|
| 12 |
+
"dtype": "float16",
|
| 13 |
"eos_token_id": 248044,
|
| 14 |
"full_attention_interval": 4,
|
| 15 |
"head_dim": 256,
|
|
|
|
| 96 |
"transformers_version": "4.57.0.dev0",
|
| 97 |
"video_token_id": 248057,
|
| 98 |
"vision_config": {
|
| 99 |
+
"torch_dtype": "float16",
|
| 100 |
"deepstack_visual_indexes": [],
|
| 101 |
"depth": 27,
|
| 102 |
"hidden_act": "gelu_pytorch_tanh",
|
|
|
|
| 114 |
},
|
| 115 |
"vision_end_token_id": 248054,
|
| 116 |
"vision_start_token_id": 248053,
|
|
|
|
| 117 |
"quantization_config": {
|
| 118 |
"quant_method": "awq",
|
| 119 |
"bits": 4,
|