# 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.

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.

Website: https://github.com/xubuvd/LLMs
