LFM2.5-1.2B-Thinking + LeetCode (QLoRA)

Early-stage reasoning fine-tune (500 steps). A LoRA adapter for LiquidAI/LFM2.5-1.2B-Thinking, trained on greengerong/leetcode to study whether algorithmic/code data transfers into better logical reasoning on a small (1.2B) model.

This is not a production model and not a "better everywhere" upgrade. It is a transparent research checkpoint with a clear trade-off: improved reasoning (ARC, MMLU) at the cost of some world-knowledge recall (CommonsenseQA, OpenBookQA).


🧪 Training Details

Item Value
Base model LiquidAI/LFM2.5-1.2B-Thinking (1.17B params)
Dataset greengerong/leetcode (code problems + solutions)
Method QLoRA (4-bit NF4 quantization)
LoRA rank (r) 16
LoRA alpha 32
LoRA dropout 0.0
LoRA init LoftQ
Optimizer AdamW 8-bit
Learning rate 2e-4 (linear schedule)
Batch size 1 per device (gradient accumulation × 4 → effective batch 4)
Max steps 500
Warmup steps 3
Context length 8192 tokens
Precision bfloat16
Seed 3407
Packing enabled
Gradient checkpointing enabled
Hardware Single NVIDIA GeForce RTX 3050, 8 GB VRAM
Training time ~3 hours (wall-clock)
Frameworks Unsloth, PEFT 0.18.1, TRL 0.23.1, Transformers 5.5.0, PyTorch 2.10.0+cu130

Training dynamics

  • Train loss: 2.09 → 0.80; final eval loss 0.83.
  • ~15.95M input tokens seen over 500 steps.

Note. batch_size = 1 (with ×4 accumulation) is a low-resource setting that introduces gradient noise; the results below reflect that. This checkpoint is an early exploration, not a fully converged model.


📊 Benchmark Results (LoRA vs. base model)

Benchmark Base LoRA Δ
ARC Easy 52.44% 64.31% +11.87
MMLU 25.89% 31.34% +5.45
HumanEval 19.51% 21.34% +1.83
ARC Challenge 32.08% 33.11% +1.02
Social IQa 41.40% 42.02% +0.61
PIQA 69.31% 69.75% +0.44
BoolQ 71.28% 71.68% +0.40
Winogrande 54.62% 54.93% +0.32
HellaSwag 40.87% 40.52% -0.35
OpenBookQA 25.60% 22.40% -3.20
CommonsenseQA 34.56% 27.60% -6.96

Interpretation

  • Positive transfer. Large gains on ARC-Easy (+11.87 pp) and MMLU (+5.45 pp) suggest the model internalized stronger reasoning patterns from the code data — reasoning generalized beyond code.
  • Trade-off / catastrophic forgetting. Drops on CommonsenseQA (-6.96 pp) and OpenBookQA (-3.20 pp) are a classic symptom of a small model overwriting world knowledge with algorithmic patterns.

🚨 Benchmark Transparency (data-leakage warning)

The training dataset greengerong/leetcode contains coding problems. Benchmarks such as HumanEval or MBPP may contain problems that are similar or identical to those in the training set.

Therefore the +1.83% on HumanEval should be read as task adaptation, not as a fair zero-shot generalization score against models that never saw this data. For an honest assessment, evaluate this adapter on completely unseen, custom tests.


⚠️ Limitations

  • Not for fact/knowledge retrieval. The adapter is measurably worse than the base model on open-book and commonsense tasks.
  • Not a general code assistant. Only a modest HumanEval gain; the base model is not code-specialized.
  • Early checkpoint. 500 steps is a small budget; results are exploratory.
  • Data-leakage caveat applies to any code benchmark (see above).

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RenShiPDev/LFM2.5-1.2B-Thinking-LeetCode-QLoRA

Adapter
(11)
this model
Adapters
1 model

Dataset used to train RenShiPDev/LFM2.5-1.2B-Thinking-LeetCode-QLoRA