CoolFace
Modelpublic

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

sourceHugging Faceotherupdated 17d agoView on Hugging Face
0likes608downloads
Model Card

LFM2.5-1.2B-Thinking-LeetCode-QLoRA — GGUF

Quantized GGUF builds of the LoRA adapter `RenShiPDev/LFM2.5-1.2B-Thinking-LeetCode-QLoRA`, merged into `LiquidAI/LFM2.5-1.2B-Thinking`.

QLoRA fine-tune (500 steps on greengerong/leetcode), converted for CPU / llama.cpp inference. Research checkpoint, not a production model.

All quants were produced from the BF16 merge with llama-quantize (no requantization).

Quality vs BF16

Measured on WikiText-2 (test split, ~246k tokens) with llama-perplexity --kl-divergence, teacher-forced. BF16 is the reference: lower PPL is better, and KLD mean is the mean KL divergence between this quant's token distribution and BF16 (0 = identical).

QuantSizebpwPPL ↓KLD mean ↓
BF162.2 GB16.0022.94310.00000
F162.2 GB16.0022.97000.00017
Q8_01.2 GB8.5122.91400.00129
Q6_K918.2 MB6.5723.13500.00524
Q5KM804.3 MB5.7623.60430.01776
Q4KM697.0 MB4.9923.32470.04798
IQ4_XS632.6 MB4.5323.74080.06506
Q3KM572.5 MB4.1025.23010.15033
Q2KL492.0 MB3.5234.37050.52051
IQ3_XXS468.2 MB3.3526.26620.30569
IQ2_M414.0 MB2.9632.24340.50539
IQ2_XXS348.2 MB2.4966.44921.23602

Recommendation: Q4_K_M — best size/quality trade-off (~697 MB, +0.38 PPL, KLD 0.048). Q6_K/Q8_0 are near-lossless. Below Q3_K_M degradation becomes large.

How it was measured

bash
# 1. save reference logits (once)
llama-perplexity -m LFM2.5-1.2B-Thinking.BF16.gguf -f wiki.test.raw -c 512 -ngl 99 \
  --save-all-logits base_logits.bin

# 2. PPL + KL divergence per quant
llama-perplexity -m <quant>.gguf -f wiki.test.raw -c 512 -ngl 99 \
  --kl-divergence --kl-divergence-base base_logits.bin

Usage

bash
# CLI
llama-cli -m LFM2.5-1.2B-Thinking.Q4_K_M.gguf -p "Explain binary search."

# Server (OpenAI-compatible)
llama-server -m LFM2.5-1.2B-Thinking.Q4_K_M.gguf --port 8080

Source