Instructions to use sojufx/Qwopus3.8-27B-Flash-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sojufx/Qwopus3.8-27B-Flash-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sojufx/Qwopus3.8-27B-Flash-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("sojufx/Qwopus3.8-27B-Flash-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("sojufx/Qwopus3.8-27B-Flash-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 sojufx/Qwopus3.8-27B-Flash-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sojufx/Qwopus3.8-27B-Flash-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": "sojufx/Qwopus3.8-27B-Flash-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/sojufx/Qwopus3.8-27B-Flash-NVFP4
- SGLang
How to use sojufx/Qwopus3.8-27B-Flash-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 "sojufx/Qwopus3.8-27B-Flash-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": "sojufx/Qwopus3.8-27B-Flash-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 "sojufx/Qwopus3.8-27B-Flash-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": "sojufx/Qwopus3.8-27B-Flash-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 sojufx/Qwopus3.8-27B-Flash-NVFP4 with Docker Model Runner:
docker model run hf.co/sojufx/Qwopus3.8-27B-Flash-NVFP4
Qwopus3.8-27B-Flash NVFP4
A native NVIDIA ModelOpt NVFP4 conversion of Jackrong/Qwopus3.8-27B-Flash, made for NVIDIA Blackwell GPUs.
This conversion uses NVFP4 for the transformer weights while intentionally retaining the language-model head in BF16. The complete vision stack and the model's native MTP speculative head are also preserved in BF16.
The precision map is deliberate: the LM head directly determines next-token logits, so preserving it at BF16 is a quality-first choice for instruction following, structured output, and tool use. This is a fresh conversion from the pinned BF16 source checkpoint, not a requantization of another quantized release.
Parameter count: 27.78B logical model parameters. Hugging Face may display a smaller "Model size" figure for this repository because its automatic scanner counts packed NVFP4
U8storage elements, rather than unpacked 4-bit weight values. The safetensors index records the full logical parameter count.
Included
- NVFP4 transformer weights in ModelOpt mixed-precision format
- BF16
lm_head - BF16 visual encoder and projector
- Native MTP / NextN speculative head
- Original tokenizer, processor, generation config, and model configuration
Serving: SGLang + DFlash2
The tested single-GPU path is a current Blackwell-capable SGLang build with FlashInfer, ModelOpt FP4 support, and a matching Qwen3.8 27B DFlash2 NVFP4 draft model. The draft model is required for the DFlash configuration below; do not use an arbitrary Qwen drafter.
python3 -m sglang.launch_server \
--trust-remote-code \
--model-path /models/Qwopus3.8-27B-Flash-NVFP4 \
--served-model-name qwopus3.8-27b-flash-nvfp4 \
--host 127.0.0.1 \
--port 8000 \
--mem-fraction-static 0.80 \
--attention-backend flashinfer \
--chunked-prefill-size 2048 \
--disable-prefill-cuda-graph \
--kv-cache-dtype fp8_e4m3 \
--max-running-requests 4 \
--context-length 262144 \
--mamba-full-memory-ratio 11.93 \
--mamba-radix-cache-strategy extra_buffer \
--mamba-ssm-dtype bfloat16 \
--default-chat-template-kwargs '{"enable_thinking":false}' \
--chat-template /models/Qwopus3.8-27B-Flash-NVFP4/chat_template.jinja \
--mm-feature-transport cpu \
--tool-call-parser qwen \
--sampling-defaults model \
--enable-metrics \
--enable-cache-report \
--speculative-algorithm DFLASH \
--speculative-draft-model-path /models/Qwen3.8-27B-DFlash2-NVFP4 \
--speculative-draft-model-quantization modelopt_fp4 \
--speculative-draft-attention-backend flashinfer \
--speculative-num-draft-tokens 10 \
--speculative-attention-mode prefill
This profile is intended for a Blackwell-class GPU with enough memory for the
target model, draft model, FP8 KV cache, and runtime overhead. Start at a
smaller context or lower --mem-fraction-static on less capable hardware.
For multimodal use, keep the bundled chat_template.jinja so image tokens are
rendered correctly. For function calling, use SGLang's Qwen tool parser. The
default profile disables thinking for predictable interactive tool use; enable
it per request only when your application expects and budgets for reasoning.
OpenCode / OpenWorker agent loops
The bundled chat template produces valid native tool calls; do not replace it
to solve an agent that stops after a sentence such as "I will inspect the
file." Some OpenCode-derived clients send tool_choice: "auto" for every
turn, including a fresh user request that clearly requires a tool. Under
auto, the model is allowed to answer with a plan and end the agent loop.
For a reliable unattended coding-agent setup, enforce tool_choice: "required"
at the client or a small OpenAI-compatible gateway only when all three are
true:
- the request has at least one tool;
tool_choiceis absent or"auto";- the last message is a new
usermessage.
Leave turns whose last message is a tool result on auto. That lets the model
either make the next necessary call or provide its final answer, without
forcing an unnecessary tool call after every result.
Example request:
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "qwopus3.8-27b-flash-nvfp4",
"messages": [{"role": "user", "content": "Reply exactly: OK"}],
"temperature": 0.6,
"top_p": 0.95,
"max_tokens": 2048,
"chat_template_kwargs": {"enable_thinking": false}
}'
Provenance
Base model: Jackrong/Qwopus3.8-27B-Flash
Thanks to Kyle Hessling for creating Qwopus3.8-27B-Flash and making the original model available to the community.
Conversion Details
- Source revision:
44d24e8cb20ceb3cdf4fe200b5a0afd970ee748a - Quantization: NVIDIA ModelOpt NVFP4 mixed precision
- LM head: BF16
- Vision and MTP weights: BF16
- Format:
safetensors
This repository contains converted model weights. Please follow the base model's license and usage terms.
- Downloads last month
- 983