Back to directory

Full-Stack Practical Techniques for Domain LLMs

A Chinese-language collection of practical notes, benchmark tables and released training code for building domain-specific large language models, covering small reasoning models, SFT and DPO data pipelines, and multi-round SFT-then-DPO training on large GPU clusters.

Full-Stack Practical Techniques for Domain LLMs

This repository is a practical write-up on building domain-specific large language models for a vertical industry or company, aimed at production deployment cost and business performance rather than research benchmarks alone. It argues for small reasoning models, in the 3 billion to 7 billion parameter range, as a starting point for most small and mid-sized deployments, and shows a benchmark table comparing precision, recall and accuracy across several models on two internal test sets.

It describes a training pipeline that alternates supervised fine-tuning and Direct Preference Optimization across several rounds, each adding new and harder preference data, and a data-production pipeline covering raw data selection, cleaning, embedding, quality and difficulty scoring and tagging before a dataset is used for SFT or preference alignment. It links out to a companion SFT training codebase and a DPO training codebase, both said to have run stably across 16 to 36 A100, A800 and H100 machines on datasets of up to two million SFT examples or 500,000 preference pairs, and to a partly released, multi-threaded pretraining data-cleaning pipeline with deduplication and a blacklist dictionary.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.