Text Generation
Transformers
Safetensors
English
qwen3_5_text
qwen3.5
reasoning
tool-calling
distillation
sft
lora
conversational
Instructions to use flashback2k/FlashModel-Qwen3.5-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flashback2k/FlashModel-Qwen3.5-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flashback2k/FlashModel-Qwen3.5-9B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flashback2k/FlashModel-Qwen3.5-9B") model = AutoModelForCausalLM.from_pretrained("flashback2k/FlashModel-Qwen3.5-9B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flashback2k/FlashModel-Qwen3.5-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flashback2k/FlashModel-Qwen3.5-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flashback2k/FlashModel-Qwen3.5-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flashback2k/FlashModel-Qwen3.5-9B
- SGLang
How to use flashback2k/FlashModel-Qwen3.5-9B 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 "flashback2k/FlashModel-Qwen3.5-9B" \ --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": "flashback2k/FlashModel-Qwen3.5-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "flashback2k/FlashModel-Qwen3.5-9B" \ --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": "flashback2k/FlashModel-Qwen3.5-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flashback2k/FlashModel-Qwen3.5-9B with Docker Model Runner:
docker model run hf.co/flashback2k/FlashModel-Qwen3.5-9B
File size: 5,690 Bytes
7780d4b 1eb5124 7780d4b 1eb5124 7780d4b 1eb5124 7780d4b 1eb5124 7780d4b 1eb5124 7780d4b 1eb5124 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | ---
base_model:
- Qwen/Qwen3.5-9B
base_model_relation: finetune
library_name: transformers
license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen3.5-9B/blob/main/LICENSE
pipeline_tag: text-generation
language:
- en
tags:
- qwen3.5
- reasoning
- tool-calling
- distillation
- sft
- lora
datasets:
- nvidia/Nemotron-SFT-Math-v4
- nvidia/Nemotron-SFT-Competitive-Programming-v2
- nvidia/Nemotron-SFT-Agentic-v2
- nvidia/Nemotron-SFT-Instruction-Following-Chat-v3
- nvidia/Nemotron-SFT-Science-v2
---
# ⚡ FlashModel-Qwen3.5-9B
A reasoning / coding / tool-calling fine-tune of [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B),
distilled from open-weight frontier teachers (DeepSeek-V4-Pro, DeepSeek-R1-0528, GLM-4.6, DeepSeek-V3.2, GPT-OSS-120B, Kimi-K2).
**GGUF quants (llama.cpp, Ollama, LM Studio): [flashback2k/FlashModel-Qwen3.5-9B-GGUF](https://huggingface.co/flashback2k/FlashModel-Qwen3.5-9B-GGUF)**
Merged BF16 weights, text-only (`Qwen3_5ForCausalLM`, no vision tower, no MTP head).
## Usage
### Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flashback2k/FlashModel-Qwen3.5-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Write a Python function that checks whether a number is prime."}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=4096, do_sample=True, temperature=0.6, top_p=0.95, top_k=20)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
```
Qwen3.5 support requires a recent `transformers` release.
### vLLM / SGLang
```bash
vllm serve flashback2k/FlashModel-Qwen3.5-9B --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder
```
### Recommended sampling
These are the base model's official recommendations ([Qwen3.5 model card](https://huggingface.co/Qwen/Qwen3.5-9B)); they were not re-tuned for the fine-tune.
| Mode | temperature | top_p | top_k | min_p | presence_penalty |
|:--|--:|--:|--:|--:|--:|
| Thinking, general | 1.0 | 0.95 | 20 | 0.0 | 1.5 |
| Thinking, precise coding | 0.6 | 0.95 | 20 | 0.0 | 0.0 |
| Non-thinking, general | 0.7 | 0.8 | 20 | 0.0 | 1.5 |
Always pass `--jinja` so the embedded Qwen3.5 chat template (thinking blocks, tool calls) is used.
### Reasoning-budget tag
Training system prompts started with a reasoning-budget tag chosen from the length of the teacher's reasoning:
```
<|reasoning_budget|>medium<|/reasoning_budget|>
```
Values: `off`, `low`, `medium`, `high`, `xhigh`, `max`. The tag's effect on output length **has not been measured yet**; treat it as experimental.
### Reasoning-budget tag
Training system prompts started with a reasoning-budget tag chosen from the length of the teacher's reasoning:
```
<|reasoning_budget|>medium<|/reasoning_budget|>
```
Values: `off`, `low`, `medium`, `high`, `xhigh`, `max`. The tag's effect on output length **has not been measured yet**; treat it as experimental.
## About the fine-tune
| | |
|:--|:--|
| Base | Qwen/Qwen3.5-9B |
| Method | LoRA r=128 (RSLoRA, α=32) on attention + MLP projections, merged |
| Data | 9,638 examples / 45M tokens, loss on assistant turns only |
| Context in training | up to 16,384 tokens (longer examples dropped, never truncated) |
| Schedule | 1 epoch, 600 steps, lr 5e-5 cosine |
| Held-out eval loss | 0.5745 (step 100) → 0.5586 (step 600) |
### Training data and teachers
Only open-weight teachers whose licenses allow training on their outputs:
| Share | Domain | Dataset | Teacher |
|--:|:--|:--|:--|
| 40% | Math (answers verified against references) | [nvidia/Nemotron-SFT-Math-v4](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Math-v4) | DeepSeek-V4-Pro |
| 22% | Competitive programming (Python) | [nvidia/Nemotron-SFT-Competitive-Programming-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Competitive-Programming-v2) | DeepSeek-R1-0528 |
| 16% | Multi-turn tool calling (judge-filtered) | [nvidia/Nemotron-SFT-Agentic-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Agentic-v2) | GLM-4.6 / DeepSeek-V3.2 |
| 11% | Instruction following | [nvidia/Nemotron-SFT-Instruction-Following-Chat-v3](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Instruction-Following-Chat-v3) | GPT-OSS-120B |
| 11% | Science reasoning | [nvidia/Nemotron-SFT-Science-v2](https://huggingface.co/datasets/nvidia/Nemotron-SFT-Science-v2) | GPT-OSS / Kimi-K2 / DeepSeek-V3.2 |
Datasets © NVIDIA, CC BY 4.0 (some Math StackExchange-derived samples CC BY-SA 4.0).
The training run's step count, sample count and eval-loss history are in [`training_metadata.json`](training_metadata.json).
## ⚠️ Status and known limitations
- **No benchmarks yet.** Lower held-out loss means the model imitates the teachers more closely; it does not by itself prove
it beats the stock Qwen3.5-9B. Comparative evals are planned and will be added here.
- **English-centric.** All training data was English. On non-English prompts (e.g. Russian) the model often *reasons* in English.
- Math and code examples longer than 16k tokens were excluded, which skews those domains toward shorter problems.
- Inherits the base model's limitations and biases.
## Credits
[Qwen team](https://huggingface.co/Qwen) for Qwen3.5 · [NVIDIA](https://huggingface.co/nvidia) for the Nemotron SFT datasets ·
DeepSeek, Zhipu AI (GLM), OpenAI (GPT-OSS) and Moonshot AI (Kimi) for open-weight teachers ·
[ggml-org/llama.cpp](https://github.com/ggml-org/llama.cpp).
|