{"data":{"slug":"baichuan-inc-baichuan-7b","name":"Baichuan-7B","tagline":"A large-scale 7B pretraining language model","github_url":"https://github.com/baichuan-inc/Baichuan-7B","owner":"baichuan-inc","repo":"Baichuan-7B","owner_avatar_url":"https://avatars.githubusercontent.com/u/136167093?v=4","primary_language":"Python","stars":5650,"forks":500,"topics":["artificial-intelligence","ceval","chatgpt","chinese","gpt-4","huggingface","large-language-models","llama","mmlu","natural-language-processing"],"archived":false,"github_pushed_at":"2024-07-18T14:23:01+00:00","maintenance_label":"Dormant","stars_delta_30d":-1,"url":"https://www.graphcanon.com/tools/baichuan-inc-baichuan-7b","markdown_url":"https://www.graphcanon.com/tools/baichuan-inc-baichuan-7b.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/baichuan-inc-baichuan-7b","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=baichuan-inc-baichuan-7b","description":"A large-scale 7B pretraining language model developed by BaiChuan-Inc.","homepage_url":"https://huggingface.co/baichuan-inc/baichuan-7B","license":"Apache-2.0","open_issues":88,"watchers":67,"ai_summary":"Baichuan-7B is a large-scale pretraining language model with 7 billion parameters developed by BaiChuan-Inc. It supports both Chinese and English, trained on around 1.2 trillion tokens, and has a context window size of 4096.","readme_excerpt":"<div align=\"center\">\n<h1>\n  Baichuan-7B\n</h1>\n</div>\n\n<p align=\"center\">\n🤗 <a href=\"https://huggingface.co/baichuan-inc/Baichuan-7B\" target=\"_blank\">Hugging Face</a> • 🤖 <a href=\"https://modelscope.cn/organization/baichuan-inc\" target=\"_blank\">ModelScope</a> • 💬 <a href=\"https://github.com/baichuan-inc/Baichuan-7B/blob/main/media/wechat.jpeg?raw=true\" target=\"_blank\">WeChat</a>\n</p>\n\n<div align=\"center\">\n\n\n<h4 align=\"center\">\n    <p>\n        <b>中文</b> |\n        <a href=\"https://github.com/baichuan-inc/Baichuan-7B/blob/main/README_EN.md\">English</a>\n    <p>\n</h4>\n</div>\n\n# 更新信息\n- [2023.09.06] 我们发布了新一代开源模型 [Baichuan 2](https://github.com/baichuan-inc/Baichuan2)，包含 7B、13B 尺寸 🔥🔥🔥\n\n# 介绍\n\nBaichuan-7B 是由百川智能开发的一个开源可商用的大规模预训练语言模型。基于 Transformer 结构，在大约 1.2 万亿 tokens 上训练的 70 亿参数模型，支持中英双语，上下文窗口长度为 4096。在标准的中文和英文 benchmark（C-Eval/MMLU）上均取得同尺寸最好的效果。\n\n# 公开benchmark榜单\n\n## 中文评测\n\n### C-Eval\n\n[C-Eval 数据集](https://cevalbenchmark.com/index.html)是一个全面的中文基础模型评测数据集，涵盖了 52 个学科和四个难度的级别。我们使用该数据集的 dev 集作为 few-shot 的来源，在 test 集上进行了 `5-shot` 测试。通过执行执行下面的命令：\n\n```bash\ncd evaluation\npython evaluate_zh.py --model_name_or_path 'your/model/path'\n```\n\n### 结果\n\n|        Model 5-shot         | Average | Avg(Hard) | STEM  | Social Sciences | Humanities | Others |\n| :-------------------------: | :-----: | :-------: | :---: | :-------------: | :--------: | :----: |\n|            GPT-4            |  68.7   |   54.9    | 67.1  |      77.6       |    64.5    |  67.8  |\n|           ChatGPT           |  54.4   |   41.4    | 52.9  |      61.8       |    50.9    |  53.6  |\n|         Claude-v1.3         |  54.2   |   39.0    | 51.9  |      61.7       |    52.1    |  53.7  |\n|     Claude-instant-v1.0     |  45.9   |   35.5    | 43.1  |      53.8       |    44.2    |  45.4  |\n|          BLOOMZ-7B          |  35.7   |   25.8    | 31.3  |      43.5       |    36.6    |  35.6  |\n|         ChatGLM-6B          |  34.5   |   23.1    | 30.4  |      39.6       |    37.4    |  34.5  |\n|   Ziya-LLaMA-13B-pretrain   |  30.2   |   22.7    | 27.7  |      34.4       |    32.0    |  28.9  |\n|  moss-moon-003-base (16B)   |  27.4   |   24.5    | 27.0  |      29.1       |    27.2    |  26.9  |\n|         LLaMA-7B-hf         |  27.1   |   25.9    | 27.1  |      26.8       |    27.9    |  26.3  |\n|          Falcon-7B          |  25.8   |   24.3    | 25.8  |      26.0       |    25.8    |  25.6  |\n|      TigerBot-7B-base       |  25.7   |   27.0    | 27.3  |      24.7       |    23.4    |  26.1  |\n|    Aquila-7B<sup>*</sup>    |  25.5   |   25.2    | 25.6  |      24.6       |    25.2    |  26.6  |\n| Open-LLaMA-v2-pretrain (7B) |  24.0   |   22.5    | 23.1  |      25.3       |    25.2    |  23.2  |\n|          BLOOM-7B           |  22.8   |   20.2    | 21.8  |      23.3       |    23.9    |  23.3  |\n|       **Baichuan-7B**       |  42.8   |   31.5    | 38.2  |      52.0       |    46.2    |  39.3  |\n\n### Gaokao\n\n[Gaokao](https://github.com/OpenLMLab/GAOKAO-Bench) 是一个以中国高考题作为评测大语言模型能力的数据集，用以评估模型的语言能力和逻辑推理能力。\n我们只保留了其中的单项选择题，随机划分后对所有模型进行统一 `5-shot` 测试。\n\n### 结果\n\n以下是测试的结果。\n\n|          Model          |  Average  |\n| :---------------------: | :-------: |\n|        BLOOMZ-7B        |   28.72   |\n|        LLaMA-7B         |   27.81   |\n|        BLOOM-7B         |   26.96   |\n|    TigerBot-7B-base     |   25.94   |\n|        Falcon-7B        |   23.98   |\n| Ziya-LLaMA-13B-pretrain |   23.17   |\n|       ChatGLM-6B        |   21.41   |\n| Open-LLaMA-v2-pretrain  |   21.41   |\n|  Aquila-7B<sup>*</sup>  |   24.39   |\n|     **Baichuan-7B**     | **36.24** |\n\n### AGIEval\n\n[AGIEval](https://github.com/microsoft/AGIEval) 旨在评估模型的认知和解决问题相关的任务中的一般能力。\n我们只保留了其中的四选一单项选择题，随机划分后对所有模型进行了统一 `5-shot` 测试。\n\n### 结果\n\n|          Model          |  Average  |\n| :---------------------: | :-------: |\n|        BLOOMZ-7B        |   30.27   |\n|        LLaMA-7B         |   28.17   |\n| Ziya-LLaMA-13B-pretrain |   27.64   |\n|        Falcon-7B        |   27.18   |\n|        BLOOM-7B         |   26.55   |\n|  Aquila-7B<sup>*</sup>  |   25.58   |","github_created_at":"2023-06-14T10:57:51+00:00","created_at":"2026-07-07T17:34:50.176772+00:00","updated_at":"2026-08-17T12:01:13.507023+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"artificial-intelligence","name":"artificial-intelligence"},{"slug":"ceval","name":"ceval"},{"slug":"chatgpt","name":"chatgpt"},{"slug":"chinese","name":"chinese"},{"slug":"gpt-4","name":"gpt-4"},{"slug":"huggingface","name":"huggingface"},{"slug":"large-language-models","name":"large language models"},{"slug":"llama","name":"llama"}],"trust":{"provenance":{"is_fork":false,"github_id":653595084,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-17T12:01:12.633Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":759,"last_release_at":null,"stars_delta_30d":-1,"open_issues_delta_30d":0},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":77,"high_count":0,"last_scan_at":"2026-07-11T11:04:11.761Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-17T12:01:13.145Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-08-17T12:01:13.145Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-08-17T12:01:13.145Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["If the project requires strong Chinese language proficiency, as Baichuan-7B has been optimized through extensive training specifically targeting Chinese language tasks.","For applications requiring a large context window size of 4096 tokens, enabling extended dialogue or complex task handling."],"when_not_to_use":["If the application primarily deals with languages other than English and Chinese, as Baichuan-7B's training has been focused on these two languages.","When a model smaller than 7-billion parameters is sufficient for the use case, especially if reducing inference time or resource consumption is more critical."],"source":"enrich:decision_facts","observed_at":"2026-07-14T19:29:08.010Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Baichuan-7B is notable for its performance in Chinese benchmarks and supports both English and Chinese languages."}]}}