Teaching a local Qwen 3.5 4B a new domain: CPT vs RAG, a four-phase experiment with evals
funJS · reddit · 2026-09-25
- The author ran a series of experiments teaching a local Qwen 3.5 4B a new domain (Unsloth for both CPT and SFT LoRA), in four phases:
- Phase 1: continued pretraining (CPT) for domain injection, focusing on picking training sets that generalize to unseen questions.
- Phase 2: comparing reasoning performance of internalized knowledge (CPT) vs RAG-injected content.
- Phase 3: practical combination — enriching CPT-trained knowledge with RAG instead of treating them as competing approaches.
- Phase 4: a comprehensive eval strategy, including SFT-tuning the CPT model to output strict schemas instead of English sentences to simplify eval checks.
- Full write-up on the author's blog; directly useful for anyone doing local domain fine-tuning.
Related event: Hands-On: Teaching Domain Knowledge to a Local 4B Model via CPT and RAG(3 posts)→
More from coding & agent
- Pigment Agents now reads and posts in Slack, inheriting user permissions — mattturck · 2026-11-12
- Map of the agent economy: 50+ startups across payments, spend control, identity, memory — venturetwins · 2026-11-12
- VentureTwins maps the B2A economy: dozens of agent infra and app companies in first series installment — venturetwins · 2026-11-12
- Google releases 76-page 'Agents Companion' whitepaper on agent engineering — mdancho84 · 2026-11-12
- Spinning up containers for 20-line agent tools is backwards: Safescript compiles provable, 50ms-deploy apps — uriwa · 2026-11-12
- Stripe launches claimable sandboxes: frictionless payment integrations for AI agents — jeff_weinstein · 2026-11-12