Instructions to use cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4") 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("cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4") model = AutoModelForMultimodalLM.from_pretrained("cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4", "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/cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4
- SGLang
How to use cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4 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 "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4" \ --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": "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4", "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 "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4" \ --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": "cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4", "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 cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4 with Docker Model Runner:
docker model run hf.co/cyankiwi/Qwen3.6-27B-AWQ-BF16-INT4
F16 or BF16?
When I look at the linear attention metadata it says that it's F16, not BF16. Which is it?
I'm also very curious about this question.
Yes, it is actually in FP16, as the model was loaded in FP16 during quantization for better precision.
Thank you for your reply! I'm a bit confused about one detail: since the original Qwen 3.6 27B model is in BF16, my understanding is that keeping it in BF16 would maintain the highest precision. Could you explain why FP16 was used instead? Thank you very much!
Yes, loading the model in BF16 would correctly preserve the weight values from the model providers.
But in calibration and quantization, FP16 higher precision provides better accuracy compared to BF16, and this compensate for the FP16 loss in weight loading. Based on the current cyankiwi AWQ models, calibrating and quantizing models in FP16 provide a few % lower KL divergence than in BF16.
For instance, 0.1 is represented as 0.0999755859 in FP16 and 0.1000976562 in BF16, which FP16 is ~4× more accurate here.
Thank you so much for the response! I'm pretty new to this space, so apologies if this is a dumb question. I originally thought that something like the approach in https://huggingface.co/Qwen/Qwen3.5-27B-GPTQ-Int4 — keeping non-quantized params in BF16 + AWQ (I know the official one uses GPTQ, just using it as an example of the format idea) — would yield the highest precision. But from what you're saying, it seems like FP16 might actually be the better choice?
I'm still a bit puzzled though — BF16 and FP16 have different exponent and mantissa bit allocations. Wouldn't converting from BF16 to FP16, then running quantization calibration and saving in that format, introduce some precision loss?
Ah, I forgot to update this — I think I’ve found the answer now.
I was originally worried that converting the original BF16 weights to FP16 might cause range-related loss or overflow. But I checked the original Qwen3.6 27B weights, and the maximum absolute value was only 25.5, far below FP16’s limit of 65504.
I wrote a bit more about the check here:
https://x.com/0xkeenz/status/2074970081050906752
So my concern about BF16 → FP16 causing overflow was unnecessary. For these weights, FP16 fits safely, and its finer mantissa can be more helpful during calibration/quantization.
Thanks again, and thanks to cpatonn for the earlier explanation!