LFM2.5-1.2B-SFT-Claude-Opus-Reasoning
LiquidAI/LFM2.5-1.2B-Instruct fine-tuned with QLoRA and TRL SFTTrainer on
ermiaazarkhalili/claude-reasoning-distillation (config sft):
conversations whose assistant turns, and the reasoning behind them, were written by Claude.
The loss covered only the assistant turn.
What this repository holds. A text-only Lfm2ForCausalLM checkpoint. The LoRA adapter is in the adapter/ subfolder.
Output format
The model writes its reasoning first, then the answer:
<think>{reasoning}</think>
{answer}
Generation ends on <|im_end|> (7); these are in generation_config.json.
Prompt format
The tokenizer's chat template, with the user turn and, optionally, a system turn. The training rows' most common system prompt, which the notebook also uses at inference:
You are a helpful AI assistant.
Training settings
| Setting | Value |
|---|---|
| max_length (tokens) | 2048 |
| quantization | 4-bit nf4, compute bfloat16 |
| lora r | 16 |
| lora lora_alpha | 32 |
| lora lora_dropout | 0.05 |
| lora target_modules | ['w3', 'w2', 'v_proj', 'q_proj', 'in_proj', 'out_proj', 'k_proj', 'w1'] |
| lora exclude_modules | None |
| lora bias | none |
| epochs | 1 |
| max_steps | -1 |
| learning_rate | 0.0001 |
| lr_scheduler | cosine |
| warmup_steps | 0.05 |
| weight_decay | 0.01 |
| batch | 1 x 8 accumulation |
| precision | bf16 |
| seed | 42 |
Results of this run
| Metric | Value |
|---|---|
| training rows | 10,278 (199 longer than max_length dropped) |
| evaluation rows | 538 (11 longer than max_length dropped) |
| optimizer steps | 1285 |
| final train loss | 0.9022552065348347 |
| final eval loss | 0.6838659048080444 |
| smoke test | False |
No benchmark was run. Compare the model with its base before relying on it.