flashback2k's picture
Model card: usage, training details, limitations
1eb5124 verified
|
Raw History Blame Contribute Delete
5.69 kB
---
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).