CoolFace
Modelpublic

RenShiPDev/LFM2.5-1.2B-Thinking-LeetCode-QLoRA

sourceHugging Faceupdated 16d agoView on Hugging Face
0likes49downloads
Model Card

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

ItemValue
Base modelLiquidAI/LFM2.5-1.2B-Thinking (1.17B params)
Datasetgreengerong/leetcode (code problems + solutions)
MethodQLoRA (4-bit NF4 quantization)
LoRA rank (r)16
LoRA alpha32
LoRA dropout0.0
LoRA initLoftQ
OptimizerAdamW 8-bit
Learning rate2e-4 (linear schedule)
Batch size1 per device (gradient accumulation ร— 4 โ†’ effective batch 4)
Max steps500
Warmup steps3
Context length8192 tokens
Precisionbfloat16
Seed3407
Packingenabled
Gradient checkpointingenabled
HardwareSingle NVIDIA GeForce RTX 3050, 8 GB VRAM
Training time~3 hours (wall-clock)
FrameworksUnsloth, 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)

BenchmarkBaseLoRAฮ”
ARC Easy52.44%64.31%+11.87
MMLU25.89%31.34%+5.45
HumanEval19.51%21.34%+1.83
ARC Challenge32.08%33.11%+1.02
Social IQa41.40%42.02%+0.61
PIQA69.31%69.75%+0.44
BoolQ71.28%71.68%+0.40
Winogrande54.62%54.93%+0.32
HellaSwag40.87%40.52%-0.35
OpenBookQA25.60%22.40%-3.20
CommonsenseQA34.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).