← all repositories
baichuan-inc/Baichuan-7B

A 7B model that actually learned Chinese

Most open 7B models are built for English; Baichuan-7B trains a LLaMA-architecture transformer on 1.2 trillion bilingual tokens to top Chinese benchmarks without tanking its MMLU score.

5.7k stars Python Language Models
Baichuan-7B
Not currently ranked — collecting fresh signals.
star history

What it does

Baichuan-7B is a 7-billion-parameter transformer trained from scratch on roughly 1.2 trillion Chinese and English tokens. It uses the standard LLaMA recipe—rotary embeddings, SwiGLU activations, RMSNorm—but ships with a custom SentencePiece tokenizer trained on 20 million multilingual sentences to fix the chronic inefficiency Western models have with Chinese text. The result is a commercially open foundation model that tops the C-Eval, Gaokao, and AGIEval leaderboards among same-sized competitors, while posting a 42.3 average on English MMLU.

The interesting bit

The team didn’t just scrape more Chinese web pages; they built a full data-weighting pipeline that auto-tunes the bilingual mix, then deduplicates with locality-sensitive hashing and filters by a learned quality model. On the infrastructure side, they squeezed 182 TFLOPS out of a thousand-card A800 cluster by fusing Flash-Attention, splitting operators, and tuning collective-communication bucket sizes—boring stuff that determines whether your pretraining budget buys you a model or a very expensive space heater.

Key highlights

  • Best-in-class 7B scores on Chinese benchmarks (C-Eval 42.8, Gaokao 36.24, AGIEval 34.44) and competitive English MMLU (42.3)
  • Custom BPE tokenizer with 64k vocabulary achieves 0.737 compression rate on Chinese text, beating LLaMA’s 1.312
  • Context window is 4096 tokens at training time, but the model generalizes past 5000 tokens without exploding perplexity
  • Training stack includes fault-recovery automation that restarts jobs in minutes rather than hours
  • Commercially open license (not just research)

Caveats

  • The repository is primarily a model card with evaluation scripts; the weights live on Hugging Face and ModelScope
  • Baichuan 2 (7B and 13B) has already superseded this version as of September 2023
  • README is Chinese-first; English documentation exists but the primary benchmarks and discussion are in Chinese

Verdict Grab it if you need a commercially open, Chinese-fluent 7B base model that won’t force you to re-tokenize your corpus. Skip it if you were hoping for training code or if you can jump straight to the newer Baichuan 2 series.

Frequently asked

What is baichuan-inc/Baichuan-7B?
Most open 7B models are built for English; Baichuan-7B trains a LLaMA-architecture transformer on 1.2 trillion bilingual tokens to top Chinese benchmarks without tanking its MMLU score.
Is Baichuan-7B open source?
Yes — baichuan-inc/Baichuan-7B is open source, released under the Apache-2.0 license.
What language is Baichuan-7B written in?
baichuan-inc/Baichuan-7B is primarily written in Python.
How popular is Baichuan-7B?
baichuan-inc/Baichuan-7B has 5.7k stars on GitHub.
Where can I find Baichuan-7B?
baichuan-inc/Baichuan-7B is on GitHub at https://github.com/baichuan-inc/Baichuan-7B.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.