Model reference · open weights

Baichuan

LLMs baichuan-inc Text gen 1 build Licence not stated 23k dl/mo

Baichuan is an open-weight language model from baichuan-inc. Baichuan-7B (BF16) weighs 14.0 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.

  • Baichuan-7B is an open-source text-generation model developed by baichuan-inc, featuring 7 billion parameters and a 4096-token context window.
  • It supports Chinese and English and is trained on approximately 1.2 trillion tokens using a Transformer architecture.
  • The model is released under a license that permits commercial use.

Summary of the baichuan-inc/Baichuan-7B model card, 2026-10-01

What it is

Released bybaichuan-inc
Released2023-06-13
VRAM14.0 GB for the weights

What it runs on

Memory and cards for Baichuan-7B (BF16)

14.0 GBweights, file size
524 MBcache per 1K tokens
652 MBruntime overhead, at least
4,096 tokenscontext max
CardRequests at onceContext maxMemory
4K each
RTX 3060 12 GB——11.6 GB
RTX 4060 Ti 16 GB—1K15.4 GB
RTX 3090 24 GB4all 4K23.4 GB
RTX 4090 24 GB4all 4K23.4 GB
RTX 5090 32 GB7all 4K31.0 GB
L40S 48 GB13all 4K44.0 GB
A100 80 GB29all 4K78.2 GB
H100 80 GB28all 4K78.1 GB
RTX PRO 6000 Blackwell 96 GB35all 4K93.8 GB
DGX Spark (GB10) 128 GB unified41all 4K107 GB
H200 141 GB55all 4K138 GB
B200 180 GB73all 4K176 GB
2× RTX 3060 12 GB
tensor parallel
3all 4K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
7all 4K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
14all 4K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
14all 4K23.4 GB a card
2× RTX 5090 32 GB
tensor parallel
21all 4K31.0 GB a card
Memory needed at each load
Requests at once4K tokens each
116.8 GB
525.4 GB
831.8 GB
1649.0 GB
3283.4 GB
64152 GB

One card, with vLLM's small-card settings.

From the model card

What baichuan-inc says about Baichuan

Read the model card

Baichuan-7B是由百川智能开发的一个开源的大规模预训练模型。基于Transformer结构,在大约1.2万亿tokens上训练的70亿参数模型,支持中英双语,上下文窗口长度为4096。在标准的中文和英文权威benchmark(C-EVAL/MMLU)上均取得同尺寸最好的效果。

如果希望使用Baichuan-7B(如进行推理、Finetune等),我们推荐使用配套代码库Baichuan-7B。

Baichuan-7B is an open-source large-scale pre-trained model developed by Baichuan Intelligent Technology. Based on the Transformer architecture, it is a model with 7 billion parameters trained on approximately 1.2 trillion tokens. It supports both Chinese and English, with a context window length of 4096. It achieves the best performance of its size on standard Chinese and English authoritative benchmarks (C-EVAL/MMLU).

If you wish to use Baichuan-7B (for inference, finetuning, etc.), we recommend using the accompanying code library Baichuan-7B.

Why use Baichuan-7B

  • 在同尺寸模型中Baichuan-7B达到了目前SOTA的水平,参考下面MMLU指标

  • Baichuan-7B使用自有的中英文双语语料进行训练,在中文上进行优化,在C-Eval达到SOTA水平

  • 不同于LLaMA完全禁止商业使用,Baichuan-7B使用更宽松的开源协议,允许用于商业目的

  • Among models of the same size, Baichuan-7B has achieved the current state-of-the-art (SOTA) level, as evidenced by the following MMLU metrics.

  • Baichuan-7B is trained on proprietary bilingual Chinese-English corpora, optimized for Chinese, and achieves SOTA performance on C-Eval.

  • Unlike LLaMA, which completely prohibits commercial use, Baichuan-7B employs a more lenient open-source license, allowing for commercial purposes.

How to Get Started with the Model

如下是一个使用Baichuan-7B进行1-shot推理的任务,根据作品给出作者名,正确输出为"夜雨寄北->李商隐"

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/Baichuan-7B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/Baichuan-7B", device_map="auto", trust_remote_code=True)
inputs = tokenizer('登鹳雀楼->王之涣\n夜雨寄北->', return_tensors='pt')
inputs = inputs.to('cuda:0')
pred = model.generate(**inputs, max_new_tokens=64,repetition_penalty=1.1)
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))

The following is a task of performing 1-shot inference using Baichuan-7B, where the author's name is given based on the work, with the correct output being "One Hundred Years of Solitude->Gabriel Garcia Marquez"

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/Baichuan-7B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/Baichuan-7B", device_map="auto", trust_remote_code=True)
inputs = tokenizer('Hamlet->Shakespeare\nOne Hundred Years of Solitude->', return_tensors='pt')
inputs = inputs.to('cuda:0')
pred = model.generate(**inputs, max_new_tokens=64,repetition_penalty=1.1)
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))

Model Details

Model Description

  • Developed by: 百川智能(Baichuan Intelligent Technology)
  • Email: opensource@baichuan-inc.com
  • Language(s) (NLP): Chinese/English
  • License: Baichuan-7B License

Model Sources

整体模型基于标准的Transformer结构,我们采用了和LLaMA一样的模型设计

  • Position Embedding:采用rotary-embedding,是现阶段被大多数模型采用的位置编码方案,具有很好的外推性。
  • Feedforward Layer:采用SwiGLU,Feedforward变化为(8/3)倍的隐含层大小,即11008。
  • Layer Normalization: 基于RMSNorm的Pre-Normalization。

具体参数和见下表

HyperparameterValue
n_parameters7000559616
n_layers32
n_heads32
d_model4096
vocab size64000
sequence length4096

The overall model is based on the standard Transformer structure, and we have adopted the same model design as LLaMA:

  • Position Embedding: We use rotary-embedding, which is the position encoding scheme adopted by most models at this stage, and it has excellent extrapolation capabilities.
  • Feedforward Layer: We use SwiGLU. The feedforward changes to (8/3) times the size of the hidden layer, that is, 11008.
  • Layer Normalization: Pre-Normalization based on RMSNorm.

The specific parameters are as follows:

HyperparameterValue
n_parameters7000559616
n_layers32
n_heads32
d_model4096
vocab size64000
sequence length4096

Uses

Downstream Use

我们同时开源出了和本模型配套的训练代码,允许进行高效的Finetune用于下游任务,具体参见Baichuan-7B。

We have also open-sourced the training code that accompanies this model, allowing for efficient finetuning for downstream tasks. For more details, please refer to Baichuan-7B.

Out-of-Scope Use

在没有充分评估风险和采取缓解措施的情况下投入生产使用;任何可能被视为不负责任或有害的使用案例。

Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.

Bias, Risks, and Limitations

Baichuan-7B可能会产生事实上不正确的输出,不应依赖它产生事实上准确的信息。Baichuan-7B是在各种公共数据集上进行训练的。尽管我们已经做出了巨大的努力来清洗预训练数据,但这个模型可能会生成淫秽、偏见或其他冒犯性的输出。

Baichuan-7B can produce factually incorrect output, and should not be relied on to produce factually accurate information. Baichuan-7B was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.

Training Details

训练具体设置参见Baichuan-7B。

For specific training settings, please refer to Baichuan-7B.

Evaluation

中文评测

C-Eval

CEval数据集是一个全面的中文基础模型评测数据集,涵盖了52个学科和四个难度的级别。我们使用该数据集的dev集作为few-shot的来源,在test集上进行了5-shot测试。

| Model 5-shot | Average | Avg(Hard) | STEM | Social Sciences | Humanities | Others | |-----------------------------|---------|-----------|------|--------

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms