Instructions to use prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 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 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") 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") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0") 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 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" # 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", "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
- SGLang
How to use prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 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" \ --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", "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" \ --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", "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 with Docker Model Runner:
docker model run hf.co/prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0
Q3.5-9B-DS-v4-Flash-v2.0
Q3.5-9B-DS-v4-Flash-v2.0 is a reasoning-capable 9B-parameter language model built on top of Qwen/Qwen3.5-9B. The model was trained through a multi-stage training pipeline using approximately 3K long-context DeepSeek V4 Flash reasoning traces, along with additional high-quality reasoning traces, to improve long-form reasoning, mathematical problem solving, scientific analysis, and instruction-following capabilities.
This model is an experimental release and may generate unexpected behaviors or reasoning artifacts in certain scenarios.
Key Highlights
- Qwen 3.5 Foundation: Built directly on top of Qwen/Qwen3.5-9B.
- Multi-Stage Training: Trained through multiple stages to progressively improve reasoning performance.
- Long-Context Reasoning: Incorporates approximately 3K long-context DeepSeek V4 Flash reasoning traces spanning mathematics, science, coding, and complex analytical tasks.
- General Reasoning Enhancement: Further trained on additional high-quality reasoning traces to strengthen instruction following and multi-step reasoning.
- Research-Focused Release: Designed for reasoning research, experimentation, and evaluation.
- Efficient 9B Deployment: Suitable for local inference and research environments.
Quick Start with Transformers
pip install transformers
pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained(
"prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(
"prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0"
)
messages = [
{
"role": "user",
"content": "Explain how a transformer model processes text."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=512
)
print(
tokenizer.decode(
outputs[0][inputs.shape[-1]:],
skip_special_tokens=True
)
)
Training Details
| Setting | Value |
|---|---|
| Base Model | Qwen/Qwen3.5-9B |
| Training Method | Multi-stage Supervised Fine-Tuning (SFT) |
| Maximum Sequence Length | 32,768 tokens (Long Context) |
| Training Precision | BF16 (Full Precision) |
| Training & Alignment Framework | TRL |
| Training Datasets | Jackrong/DeepSeek-V4-Distill-8000x, sequelbox/Titanium4-DeepSeek-V4-Pro, and additional high-quality reasoning datasets |
Model Files
| Resource | Link |
|---|---|
| Transformers Model | prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0 |
| GGUF (llama.cpp Quantizations) | https://huggingface.co/prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0-GGUF |
Intended Use
- Reasoning Research: Studying long-context reasoning and multi-stage training techniques.
- Mathematical Reasoning: Solving complex mathematical problems with multi-step reasoning.
- Scientific Reasoning: Performing structured scientific analysis and problem solving.
- Coding Assistance: Improving code understanding and generation through long-context reasoning.
- Instruction Following: Evaluating and improving instruction-following capabilities.
- Local Deployment: Running efficient 9B reasoning models in research and experimentation environments.
Limitations
- Experimental Model: Behavior may differ from the base model in certain scenarios.
- Reasoning Artifacts: Complex reasoning chains may occasionally produce incorrect intermediate steps or conclusions.
- Training Biases: Performance reflects the characteristics and coverage of the reasoning datasets used during training.
Acknowledgements
Qwen/Qwen3.5-9B: Base model used for this project.
TRL - Transformers Reinforcement Learning: TRL is a full stack library providing tools to train transformer language models with methods including Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), Direct Preference Optimization (DPO), Reward Modeling, and more.
Transformers: Transformers provides state-of-the-art machine learning models for text, computer vision, audio, video, and multimodal tasks, supporting both inference and training.
- Downloads last month
- 73
Model tree for prithivMLmods/Q3.5-9B-DS-v4-Flash-v2.0
Base model
Qwen/Qwen3.5-9B-Base