Renaissance LabsLearn

Topics

Lora

5 recipes

Recipes

LoRA SFT + GGUF (Local) · Renaissance Labs × NAISSHemma on Gemma 4 12B: Pushing Swedish grammar to 95.3% Sv-BLiMP at homeApply the Hemma Swedish SFT brand to Google's Gemma 4 12B Instruct on 27,119 curated, open-licensed Swedish and replay examples (RenaissanceLabsEU/hemma-sv-sft-v0.2) in ~1h 40m on a single 32 GB Apple M5 MacBook. Held-out validation loss drops from 4.319 to 1.059 (−3.26 nats), Swedish grammaticality on all 16 Tarnyd/sv-blimp phenomena jumps from 87.5% (56/64) to 95.3% (61/64), and we export both 4-bit MLX weights and on-device Q4_K_M / Q6_K GGUF files using llama.cpp 1.0.0.1h 40m 2,000 steps · 679.9k tok · 1 Apple M5 laptop (32 GB) · 95.3% 61/64 (+7.8 pp vs base)MoE LoRA SFT (Local) · Renaissance Labs × NAISSHemma on Inkling-2-Mini: Fine-tuning a 26.4B MoE for Swedish in 27 minutes at homeApply the Hemma Swedish SFT recipe (hemma-sv-sft-v0.2) to Thinking Machines' Apache-2.0 Inkling-2-Mini (26.4B-total looped MoE) in just 27 minutes on a 32 GB Apple M5 MacBook. By keeping the NVFP4/MXFP8 routed experts frozen, training attention LoRA on the top 4 layers (1.11M trainable params = 0.004%), and filtering sequences to <=500 tokens with mlx_lm's exact ChatDataset to prevent mask_prompt NaN, validation loss drops from 1.451 to 0.731 (best, step 400) / 0.867 (step 2,000), Sv-BLiMP climbs from 89.1% to 92.2% (+3.1 pp), and creative Swedish agreement errors disappear.27 min 2,000 steps · 202.4k tok · 1 Apple M5 laptop (32 GB) · 92.2% 59/64 (+3.1 pp vs base)LoRA SFT (Part 1 · Local) · Renaissance LabsHemma v0.1: Training a 9B Swedish model at home on an Apple M5 laptopFine-tune OpenEuroLLM's 9.1B Prelude-SFT-Propella-Excellent-v0.2 on 10,023 curated, open-licensed Swedish examples in 50 minutes on a single 32 GB Apple M5 MacBook using 4-bit MLX QLoRA. Validation loss drops from 2.242 to 1.434 (−0.81 nats), garbled Swedish spelling and word-fusion bugs disappear on qualitative probes, and both Swedish JSON keys and non-editing controls stay intact. This is Part 1 — we publish both ready-to-run 4-bit MLX weights and unfused LoRA adapters so we can continue training in Part 2.50 min 1,200 steps · 158 tok/s · 1 Apple M5 laptop (32 GB) · 10,023 9,522 train · 501 validLoRA SFT + GGUF (Part 2 · Local) · Renaissance Labs × NAISSHemma v0.2 (Part 2): Prelude 9B on expanded Swedish data + on-device GGUFPart 2 scales our home-forged Prelude 9B Swedish fine-tune to the 27,119-row hemma-sv-sft-v0.2 dataset (2,000 steps, 664.0k supervised tokens, ~1h 35m on Apple M5) with 100% matched hyperparameters against Gemma 4 12B Hemma v0.1. Held-out validation loss drops from 1.815 to 0.869 at step 1,200 (−0.946 nats), Swedish Facts improves from 10.0% to 13.3%, everyday Swedish emails become completely natural, and we document the exact SentencePiece SFT special-token patch required to export clean Prelude GGUF files for Ollama and llama.cpp.1h 35m 2,000 steps · 664.0k tok · 0.869 ↓ from 1.815 (step 1,200) · 13.3% 4/30 (highest in suite)LoRA SFT + temperature calibration · Renaissance LabsSingle-token MLX LoRA and temperature scaling for calibrated Swedish agency decisionsFine-tune a 4-bit Qwen3-1.7B model on 2,731 Swedish agency decision tasks in six minutes on an Apple M5 laptop, then fit a single scalar temperature on a separate calibration split. Frozen holdout accuracy rises from 34.0% to 53.8% (+19.7pp), uncertainty handling jumps +65.7pp to 78.1%, and calibration error (ECE-10) is cut more than in half from 0.184 to 0.080.2 LoRA SFT, then temperature T · 1 Apple M5 laptop (32 GB) · 2,731 train rows · 216 valid · 261 cal