Instructions to use ig1/Qwen3.5-9B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ig1/Qwen3.5-9B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ig1/Qwen3.5-9B-NVFP4") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ig1/Qwen3.5-9B-NVFP4") model = AutoModelForImageTextToText.from_pretrained("ig1/Qwen3.5-9B-NVFP4") 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
- vLLM
How to use ig1/Qwen3.5-9B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ig1/Qwen3.5-9B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ig1/Qwen3.5-9B-NVFP4", "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/ig1/Qwen3.5-9B-NVFP4
- SGLang
How to use ig1/Qwen3.5-9B-NVFP4 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 "ig1/Qwen3.5-9B-NVFP4" \ --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": "ig1/Qwen3.5-9B-NVFP4", "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 "ig1/Qwen3.5-9B-NVFP4" \ --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": "ig1/Qwen3.5-9B-NVFP4", "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 ig1/Qwen3.5-9B-NVFP4 with Docker Model Runner:
docker model run hf.co/ig1/Qwen3.5-9B-NVFP4
File size: 1,940 Bytes
e55d04c 3b9e07b e55d04c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | services:
qwen35-rp:
image: ghcr.io/iguanesolutions/qwen35-rp:v0.2.0
container_name: Qwen3.5-ReverseProxy
environment:
QWEN35RP_LOGLEVEL: INFO
QWEN35RP_ENFORCE_SAMPLING_PARAMS: "true"
QWEN35RP_TARGET: "http://vllm-qwen3.5-9b-nvfp4:8000"
QWEN35RP_SERVED_MODEL_NAME: "Qwen3.5-9B"
QWEN35RP_THINKING_GENERAL_MODEL: "Qwen3.5-9B Thinking General"
QWEN35RP_THINKING_CODING_MODEL: "Qwen3.5-9B Thinking Coding"
QWEN35RP_INSTRUCT_GENERAL_MODEL: "Qwen3.5-9B Instruct General"
QWEN35RP_INSTRUCT_REASONING_MODEL: "Qwen3.5-9B Instruct Creative"
ports:
- "127.0.0.1:8000:9000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
vllm-qwen3.5-9b-nvfp4:
image: vllm/vllm-openai:v0.18.0-cu130
container_name: Qwen3.5-9B-NVFP4-vLLM
command:
- "ig1/Qwen3.5-9B-NVFP4"
- --served-model-name
- "Qwen3.5-9B"
- --reasoning-parser
- "qwen3"
- --enable-auto-tool-choice
- --tool-call-parser
- "qwen3_coder"
- --max-model-len
- "auto"
- --limit-mm-per-prompt.video
- "0"
- --max-cudagraph-capture-size
- "64"
- --max-num-seqs
- "64"
- --gpu-memory-utilization
- "0.8"
environment:
HF_TOKEN: ${HF_TOKEN:-} # Uses env var if set, otherwise empty
VLLM_MEMORY_PROFILER_ESTIMATE_CUDAGRAPHS: "1"
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# ports:
# - "127.0.0.1:8000:8000"
volumes:
- E:\cache:/root/.cache # Adapt to your host
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
|