Instructions to use QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="QUASAR-QAT/Qwen3.8-27B-QUASAR-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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4", 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 QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QUASAR-QAT/Qwen3.8-27B-QUASAR-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": "QUASAR-QAT/Qwen3.8-27B-QUASAR-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/QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4
- SGLang
How to use QUASAR-QAT/Qwen3.8-27B-QUASAR-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 "QUASAR-QAT/Qwen3.8-27B-QUASAR-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": "QUASAR-QAT/Qwen3.8-27B-QUASAR-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 "QUASAR-QAT/Qwen3.8-27B-QUASAR-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": "QUASAR-QAT/Qwen3.8-27B-QUASAR-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 QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4 with Docker Model Runner:
docker model run hf.co/QUASAR-QAT/Qwen3.8-27B-QUASAR-NVFP4
This model keeps quitting mid-way and/or doesn't answer
What are the prompts or queries to reproduce this behavior?
Many different types, but the screenshots are part of my internal benchmarks. The most I've encountered this is over long horizon coding tasks on Pi, though I did spend more time on long horizon coding tasks. Coding can be for Python, frontend, etc.
I am also experiencing this issue. The quantization delivers excellent quality when functioning normally, but it occasionally halts unexpectedly mid-generation.
In two recent instances, it exited the reasoning phase on the word have, generated a few words of content output, and then stopped entirely right after the word not.
My setup uses Java with direct OpenAI API calls (via a custom agent framework).
I usually find when a model is fully coherent and cuts off half way through a sentence, a max token limit is to blame. At least in the first screenshot, hover over the i in the circle. Should tell you details about how many tokens are being used. See if it always fails around the same number of tokens.
I usually find when a model is fully coherent and cuts off half way through a sentence, a max token limit is to blame. At least in the first screenshot, hover over the i in the circle. Should tell you details about how many tokens are being used. See if it always fails around the same number of tokens.
That's a really good point and a likely cause.
If anyone is running into that issue, could you check whether it is terminated by hitting max length?
In my case, it wasn't the max token limit or a full context window (e.g., context was ~90k out of 262k, with a relatively short response). The model actually recovered easily and proceeded to a full answer once I continued, keeping all previous messages (including reasoning) and adding a new message noting that the response was cut off.
Stopping prematurely is a known LLM behavior, similar to hallucinations or repetition loops. It's too early for me to say for sure whether this quantization suffers more from it, though I suspect it might. Still, most of the time it performs very well. If it does happen more often here, perhaps post-tuning or quantization alignment somehow encouraged premature <eos> (End-of-Sequence) generation?
I usually find when a model is fully coherent and cuts off half way through a sentence, a max token limit is to blame. At least in the first screenshot, hover over the i in the circle. Should tell you details about how many tokens are being used. See if it always fails around the same number of tokens.
That's a really good point and a likely cause.
If anyone is running into that issue, could you check whether it is terminated by hitting max length?
Definitely not because of hitting max length. The screenshot in particular was at 100s of tokens. I set the max to 262k.

