Instructions to use prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8") 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("prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8", 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 prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8", "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/prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8
- SGLang
How to use prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 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 "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8" \ --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": "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8", "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 "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8" \ --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": "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8", "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 prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 with Docker Model Runner:
docker model run hf.co/prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8
Q3.5-9B-DS-v4-Flash-v2.0-fp8
Q3.5-9B-DS-v4-Flash-v2.0-fp8 is an efficient 8-bit floating point (
FP8_DYNAMIC) quantized checkpoint of prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 (derived fromQwen/Qwen3.5-9B). Quantized via LLM Compressor into thecompressed-tensorsformat, this release cuts VRAM usage by ~50% while preserving high reasoning fidelity across math, science, code, and long-context analysis. This model is an experimental research release. Due to distillation and abliterated alignment techniques, it may exhibit unexpected behaviors or unfiltered reasoning artifacts.
Model Overview
| Setting | Details |
|---|---|
| Quantized Model | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 |
| Underlying Model | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 |
| Base Architecture | Qwen/Qwen3.5-9B |
| Quantization Method | LLM Compressor |
| Quantization Scheme | FP8_DYNAMIC (Linear layers only) |
| Format | compressed-tensors |
| Calibration Required | No (Runtime dynamic activation scaling) |
| Excluded from Quantization | lm_head, embed_tokens, visual, model.visual, linear_attn (preserved in full precision) |
| License | Apache-2.0 |
Quantization Details
Quantization was performed using LLM Compressor with dynamic per-tensor activation scaling applied to standard Linear projections. Sensitive layers—including input embeddings, the LM head, linear attention mechanisms, and vision blocks—were excluded from quantization to maintain mathematical reasoning integrity and prevent output degradation.
Quantization Recipe
default_stage:
default_modifiers:
QuantizationModifier:
targets: [Linear]
ignore:
- 're:.*lm_head'
- 're:.*embed_tokens$'
- 're:.*visual.*'
- 're:.*model.visual.*'
- 're:.*linear_attn.*'
scheme: FP8_DYNAMIC
bypass_divisibility_checks: false
requires_calibration_data: false
Key Highlights
- High-Throughput FP8: Reduces memory footprint to ~9–10 GB, enabling fast local execution on consumer GPUs (RTX 3090/4090, L40S, A100, H100).
- DeepSeek V4 Flash Traces: Fine-tuned on ~3K long-context DeepSeek V4 Flash reasoning traces covering complex mathematics, technical coding, and analytical benchmarks.
- Preserved Sensitivity: Unquantized attention projection exceptions (
linear_attn) and heads prevent numerical drift during extended multi-step generation. - Native vLLM & Transformers Compatibility: Direct drop-in support via the
compressed-tensorsstandard.
Quick Start & Inference
1. High-Throughput Serving with vLLM (Recommended)
Install vLLM:
pip install vllm
Launch an OpenAI-compatible API server:
vllm serve prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 \
--max-model-len 32768 \
--gpu-memory-utilization 0.90 \
--trust-remote-code
Run inference via Python:
from vllm import LLM, SamplingParams
llm = LLM(
model="prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8",
trust_remote_code=True,
max_model_len=32768
)
sampling_params = SamplingParams(
temperature=0.6,
top_p=0.95,
max_tokens=2048
)
messages = [
{"role": "user", "content": "Solve the following problem step-by-step: Let f(x) = x^3 - 3x + 1. Find the number of distinct real roots in the interval [-2, 2]."}
]
outputs = llm.chat(messages, sampling_params)
print(outputs[0].outputs[0].text)
2. Transformers & Compressed-Tensors
pip install transformers compressed-tensors accelerate torch
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True
)
messages = [
{
"role": "user",
"content": "Explain how multi-head latent attention reduces KV cache overhead in large language models."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
inputs,
max_new_tokens=1024,
temperature=0.6,
top_p=0.95,
do_sample=True
)
print(
tokenizer.decode(
outputs[0][inputs.shape[-1]:],
skip_special_tokens=True
)
)
Model Files & Quantizations
| Resource | Link |
|---|---|
| Full Precision (BF16) | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 |
| FP8 Compressed Tensors | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8 |
| GGUF (llama.cpp) | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-GGUF |
Intended Use
- Reasoning Research: High-efficiency research into long-context reasoning chains and distillation behavior.
- Mathematical & Scientific Problem Solving: Structured multi-step derivations with lower compute latency.
- Constrained VRAM Deployments: Single-GPU local or edge deployment setups requiring 32K context windows without requiring 24GB+ FP16 allocations.
Limitations & Risks
- Experimental Output: The underlying model utilizes abliteration and multi-stage distillation; refusal behaviors may be significantly minimized.
- Quantization Artifacts: Although FP8 dynamic scaling retains high fidelity, small numerical discrepancies can occasionally manifest in long reasoning chains.
- Hardware Support: FP8 native hardware speedups require NVIDIA Ada Lovelace, Hopper, or newer architectures. Older architectures fall back to emulated or dequantized kernels.
Acknowledgements
- Qwen Team: For the foundational
Qwen/Qwen3.5-9Barchitecture. - vLLM Project: For
llm-compressorand thecompressed-tensorsspecification. - DeepSeek AI: For foundational inspiration and distillation trace topologies.
- Downloads last month
- -
Model tree for prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-fp8
Base model
Qwen/Qwen3.5-9B-Base