Instructions to use QuantTrio/Qwen3.5-397B-A17B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/Qwen3.5-397B-A17B-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-397B-A17B-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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("QuantTrio/Qwen3.5-397B-A17B-AWQ") model = AutoModelForMultimodalLM.from_pretrained("QuantTrio/Qwen3.5-397B-A17B-AWQ", 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 QuantTrio/Qwen3.5-397B-A17B-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-397B-A17B-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-397B-A17B-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-397B-A17B-AWQ
- SGLang
How to use QuantTrio/Qwen3.5-397B-A17B-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-397B-A17B-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-397B-A17B-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-397B-A17B-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-397B-A17B-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-397B-A17B-AWQ with Docker Model Runner:
docker model run hf.co/QuantTrio/Qwen3.5-397B-A17B-AWQ
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ base_model_relation: quantized
|
|
| 12 |
|
| 13 |
---
|
| 14 |
# Qwen3.5-397B-A17B-AWQ
|
| 15 |
-
Base model: [Qwen/Qwen3.5-397B-A17B](https://
|
| 16 |
|
| 17 |
This repo quantizes the model using data-free quantization (no calibration dataset required).
|
| 18 |
|
|
@@ -58,7 +58,7 @@ export VLLM_USE_FLASHINFER_SAMPLER=0
|
|
| 58 |
export OMP_NUM_THREADS=4
|
| 59 |
|
| 60 |
vllm serve \
|
| 61 |
-
__YOUR_PATH__/
|
| 62 |
--served-model-name MY_MODEL \
|
| 63 |
--swap-space 16 \
|
| 64 |
--max-num-seqs 32 \
|
|
@@ -88,8 +88,8 @@ vllm serve \
|
|
| 88 |
|
| 89 |
### 【Model Download】
|
| 90 |
```python
|
| 91 |
-
from
|
| 92 |
-
snapshot_download('
|
| 93 |
```
|
| 94 |
|
| 95 |
### 【Overview】
|
|
|
|
| 12 |
|
| 13 |
---
|
| 14 |
# Qwen3.5-397B-A17B-AWQ
|
| 15 |
+
Base model: [Qwen/Qwen3.5-397B-A17B](https://huggingface.co/Qwen/Qwen3.5-397B-A17B)
|
| 16 |
|
| 17 |
This repo quantizes the model using data-free quantization (no calibration dataset required).
|
| 18 |
|
|
|
|
| 58 |
export OMP_NUM_THREADS=4
|
| 59 |
|
| 60 |
vllm serve \
|
| 61 |
+
__YOUR_PATH__/QuantTrio/Qwen3.5-397B-A17B-AWQ \
|
| 62 |
--served-model-name MY_MODEL \
|
| 63 |
--swap-space 16 \
|
| 64 |
--max-num-seqs 32 \
|
|
|
|
| 88 |
|
| 89 |
### 【Model Download】
|
| 90 |
```python
|
| 91 |
+
from huggingface_hub import snapshot_download
|
| 92 |
+
snapshot_download('QuantTrio/Qwen3.5-397B-A17B-AWQ', cache_dir="your_local_path")
|
| 93 |
```
|
| 94 |
|
| 95 |
### 【Overview】
|