Upload folder using huggingface_hub
Browse files- README.md +326 -0
- added_tokens.json +10 -0
- chat_template.jinja +7 -0
- config.json +175 -0
- configuration_minicpm.py +203 -0
- generation_config.json +8 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +298 -0
- modeling_minicpm.py +0 -0
- special_tokens_map.json +40 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +119 -0
README.md
CHANGED
|
@@ -1,3 +1,329 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
+
# AgentCPM-Report: Gemini-2.5-pro-DeepResearch Level Local DeepResearch
|
| 5 |
+
|
| 6 |
+
<p align="center">
|
| 7 |
+
<a href='https://huggingface.co/openbmb/AgentCPM-Report'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-AgentCPM--Report-yellow'>
|
| 8 |
+
<a href='https://huggingface.co/openbmb/AgentCPM-Report-GGUF'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-AgentCPM--Report--GGUF-yellow'>
|
| 9 |
+
<a href='https://github.com/OpenBMB/AgentCPM'><img src='https://img.shields.io/badge/GitHub-AgentCPM-blue?logo=github'>
|
| 10 |
+
<a href='https://github.com/OpenBMB/UltraRAG'><img src='https://img.shields.io/badge/GitHub-UltraRAG-blue?logo=github'>
|
| 11 |
+
</p>
|
| 12 |
+
|
| 13 |
+
## Links
|
| 14 |
+
- [AgentCPM-Report](https://huggingface.co/openbmb/AgentCPM-Report) The Gemini-2.5-pro-DeepResearch Level Local DeepResearch Model
|
| 15 |
+
- [AgentCPM-Report-GGUF](https://huggingface.co/openbmb/AgentCPM-Report-GGUF) The GGUF version
|
| 16 |
+
- [AgentCPM](https://github.com/OpenBMB/AgentCPM) Our code for AgentCPM Series
|
| 17 |
+
- [UltraRAG](https://github.com/OpenBMB/UltraRAG) The low code RAG Framework
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
## News
|
| 21 |
+
- [2026-01-20] 🚀🚀🚀 We open-sourced AgentCPM-Report built on MiniCPM4.1-8B, capable of matching top closed-source commercial systems like Gemini-2.5-pro-DeepResearch in report generation.
|
| 22 |
+
|
| 23 |
+
## Overview
|
| 24 |
+
AgentCPM-Report is an open-source large language model agent jointly developed by [THUNLP](https://nlp.csai.tsinghua.edu.cn), Renmin University of China [RUCBM](https://github.com/RUCBM), and [ModelBest](https://modelbest.cn/en). It is based on the [MiniCPM4.1](https://github.com/OpenBMB/MiniCPM4.1) 8B-parameter base model. It accepts user instructions as input and autonomously generates long-form reports. Key highlights:
|
| 25 |
+
|
| 26 |
+
- **Strong advantages in insight and comprehensiveness**: The first 8B edge-side model to surpass closed-source DeepResearch systems on deep research report generation tasks, redefining the performance ceiling for small-scale agent systems—especially achieving SOTA results on the Insight metric.
|
| 27 |
+
- **Lightweight and local deployment**: Supports agile local deployment. With frameworks like UltraRAG, it enables large-scale knowledge base construction and can generate reports that are even more professional and in-depth than large models. Lightweight models plus local knowledge bases make it feasible to deploy a deep-research report writing system on a personal computer, laying the foundation for report writing based on personal privacy data or private-domain data.
|
| 28 |
+
|
| 29 |
+
## Demo Cases
|
| 30 |
+
`YouTube link or Bilibili link for the video`
|
| 31 |
+
|
| 32 |
+
## Quick Start
|
| 33 |
+
### Docker Deployment
|
| 34 |
+
We provide a minimal one-click `docker-compose` deployment integrated with UltraRAG, including the RAG framework UltraRAG2.0, the model inference framework vllm, and the vector database milvus. If you want CPU inference, we also provide a llama.cpp-based version for gguf models—just switch `docker-compose.yml` to `docker-compose.cpu.yml`.
|
| 35 |
+
|
| 36 |
+
``` bash
|
| 37 |
+
git clone git@github.com:OpenBMB/UltraRAG.git
|
| 38 |
+
cd UltraRAG
|
| 39 |
+
git checkout agentcpm-report-demo
|
| 40 |
+
cd agentcpm-report-demo
|
| 41 |
+
cp env.example .env
|
| 42 |
+
docker-compose -f docker-compose.yml up -d --build
|
| 43 |
+
docker-compose -f docker-compose.yml logs -f ultrarag-ui
|
| 44 |
+
```
|
| 45 |
+
The first startup pulls images, downloads the model, and configures the environment, which takes about 30 minutes.
|
| 46 |
+
Then open `http://localhost:5050`. If you can see the UI, your deployment is successful.
|
| 47 |
+
Follow the UI instructions to upload local files, chunk them, and build indexes; then in the Chat section, select AgentCPM-Report in the pipeline to start your workflow.
|
| 48 |
+
|
| 49 |
+
(Optional) You can import [Wiki2024](https://modelscope.cn/datasets/UltraRAG/UltraRAG_Benchmark/tree/master/corpus/wiki24) as the writing database.
|
| 50 |
+
|
| 51 |
+
You can read more tutorials about AgentCPM-Report in the [documentation](https://ultrarag.openbmb.cn/pages/cn/pipeline/agentcpm-report).
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
## Evaluation
|
| 55 |
+
<table align="center">
|
| 56 |
+
<thead>
|
| 57 |
+
<tr>
|
| 58 |
+
<th align="center">DeepResearch Bench</th>
|
| 59 |
+
<th align="center">Overall</th>
|
| 60 |
+
<th align="center">Comprehensiveness</th>
|
| 61 |
+
<th align="center">Insight</th>
|
| 62 |
+
<th align="center">Instruction Following</th>
|
| 63 |
+
<th align="center">Readability</th>
|
| 64 |
+
</tr>
|
| 65 |
+
</thead>
|
| 66 |
+
<tbody>
|
| 67 |
+
<tr>
|
| 68 |
+
<td align="center">Doubao-research</td>
|
| 69 |
+
<td align="center">44.34</td>
|
| 70 |
+
<td align="center">44.84</td>
|
| 71 |
+
<td align="center">40.56</td>
|
| 72 |
+
<td align="center">47.95</td>
|
| 73 |
+
<td align="center">44.69</td>
|
| 74 |
+
</tr>
|
| 75 |
+
<tr>
|
| 76 |
+
<td align="center">Claude-research</td>
|
| 77 |
+
<td align="center">45</td>
|
| 78 |
+
<td align="center">45.34</td>
|
| 79 |
+
<td align="center">42.79</td>
|
| 80 |
+
<td align="center">47.58</td>
|
| 81 |
+
<td align="center">44.66</td>
|
| 82 |
+
</tr>
|
| 83 |
+
<tr>
|
| 84 |
+
<td align="center">OpenAI-deepresearch</td>
|
| 85 |
+
<td align="center">46.45</td>
|
| 86 |
+
<td align="center">46.46</td>
|
| 87 |
+
<td align="center">43.73</td>
|
| 88 |
+
<td align="center">49.39</td>
|
| 89 |
+
<td align="center">47.22</td>
|
| 90 |
+
</tr>
|
| 91 |
+
<tr>
|
| 92 |
+
<td align="center">Gemini-2.5-Pro-deepresearch</td>
|
| 93 |
+
<td align="center">49.71</td>
|
| 94 |
+
<td align="center">49.51</td>
|
| 95 |
+
<td align="center">49.45</td>
|
| 96 |
+
<td align="center">50.12</td>
|
| 97 |
+
<td align="center">50</td>
|
| 98 |
+
</tr>
|
| 99 |
+
<tr>
|
| 100 |
+
<td align="center">WebWeaver(Qwen3-30B-A3B)</td>
|
| 101 |
+
<td align="center">46.77</td>
|
| 102 |
+
<td align="center">45.15</td>
|
| 103 |
+
<td align="center">45.78</td>
|
| 104 |
+
<td align="center">49.21</td>
|
| 105 |
+
<td align="center">47.34</td>
|
| 106 |
+
</tr>
|
| 107 |
+
<tr>
|
| 108 |
+
<td align="center">WebWeaver(Claude-Sonnet-4)</td>
|
| 109 |
+
<td align="center">50.58</td>
|
| 110 |
+
<td align="center">51.45</td>
|
| 111 |
+
<td align="center">50.02</td>
|
| 112 |
+
<td align="center">50.81</td>
|
| 113 |
+
<td align="center">49.79</td>
|
| 114 |
+
</tr>
|
| 115 |
+
<tr>
|
| 116 |
+
<td align="center">Enterprise-DR(Gemini-2.5-Pro)</td>
|
| 117 |
+
<td align="center">49.86</td>
|
| 118 |
+
<td align="center">49.01</td>
|
| 119 |
+
<td align="center">50.28</td>
|
| 120 |
+
<td align="center">50.03</td>
|
| 121 |
+
<td align="center">49.98</td>
|
| 122 |
+
</tr>
|
| 123 |
+
<tr>
|
| 124 |
+
<td align="center">RhinoInsigh(Gemini-2.5-Pro)</td>
|
| 125 |
+
<td align="center">50.92</td>
|
| 126 |
+
<td align="center">50.51</td>
|
| 127 |
+
<td align="center">51.45</td>
|
| 128 |
+
<td align="center">51.72</td>
|
| 129 |
+
<td align="center">50</td>
|
| 130 |
+
</tr>
|
| 131 |
+
<tr>
|
| 132 |
+
<td align="center">AgentCPM-Report</td>
|
| 133 |
+
<td align="center">50.11</td>
|
| 134 |
+
<td align="center">50.54</td>
|
| 135 |
+
<td align="center">52.64</td>
|
| 136 |
+
<td align="center">48.87</td>
|
| 137 |
+
<td align="center">44.17</td>
|
| 138 |
+
</tr>
|
| 139 |
+
</tbody>
|
| 140 |
+
</table>
|
| 141 |
+
|
| 142 |
+
<table align="center">
|
| 143 |
+
<thead>
|
| 144 |
+
<tr>
|
| 145 |
+
<th align="center">DeepResearch Gym</th>
|
| 146 |
+
<th align="center">Avg.</th>
|
| 147 |
+
<th align="center">Clarity</th>
|
| 148 |
+
<th align="center">Depth</th>
|
| 149 |
+
<th align="center">Balance</th>
|
| 150 |
+
<th align="center">Breadth</th>
|
| 151 |
+
<th align="center">Support</th>
|
| 152 |
+
<th align="center">Insightfulness</th>
|
| 153 |
+
</tr>
|
| 154 |
+
</thead>
|
| 155 |
+
<tbody>
|
| 156 |
+
<tr>
|
| 157 |
+
<td align="center">Doubao-research</td>
|
| 158 |
+
<td align="center">84.46</td>
|
| 159 |
+
<td align="center">68.85</td>
|
| 160 |
+
<td align="center">93.12</td>
|
| 161 |
+
<td align="center">83.96</td>
|
| 162 |
+
<td align="center">93.33</td>
|
| 163 |
+
<td align="center">84.38</td>
|
| 164 |
+
<td align="center">83.12</td>
|
| 165 |
+
</tr>
|
| 166 |
+
<tr>
|
| 167 |
+
<td align="center">Claude-research</td>
|
| 168 |
+
<td align="center">80.25</td>
|
| 169 |
+
<td align="center">86.67</td>
|
| 170 |
+
<td align="center">96.88</td>
|
| 171 |
+
<td align="center">84.41</td>
|
| 172 |
+
<td align="center">96.56</td>
|
| 173 |
+
<td align="center">26.77</td>
|
| 174 |
+
<td align="center">90.22</td>
|
| 175 |
+
</tr>
|
| 176 |
+
<tr>
|
| 177 |
+
<td align="center">OpenAI-deepresearch</td>
|
| 178 |
+
<td align="center">91.27</td>
|
| 179 |
+
<td align="center">84.90</td>
|
| 180 |
+
<td align="center">98.10</td>
|
| 181 |
+
<td align="center">89.80</td>
|
| 182 |
+
<td align="center">97.40</td>
|
| 183 |
+
<td align="center">88.40</td>
|
| 184 |
+
<td align="center">89.00</td>
|
| 185 |
+
</tr>
|
| 186 |
+
<tr>
|
| 187 |
+
<td align="center">Gemini-2.5-pro-deepresearch</td>
|
| 188 |
+
<td align="center">96.02</td>
|
| 189 |
+
<td align="center">90.71</td>
|
| 190 |
+
<td align="center">99.90</td>
|
| 191 |
+
<td align="center">93.37</td>
|
| 192 |
+
<td align="center">99.69</td>
|
| 193 |
+
<td align="center">95.00</td>
|
| 194 |
+
<td align="center">97.45</td>
|
| 195 |
+
</tr>
|
| 196 |
+
<tr>
|
| 197 |
+
<td align="center">WebWeaver (Qwen3-30b-a3b)</td>
|
| 198 |
+
<td align="center">77.27</td>
|
| 199 |
+
<td align="center">71.88</td>
|
| 200 |
+
<td align="center">85.51</td>
|
| 201 |
+
<td align="center">75.80</td>
|
| 202 |
+
<td align="center">84.78</td>
|
| 203 |
+
<td align="center">63.77</td>
|
| 204 |
+
<td align="center">81.88</td>
|
| 205 |
+
</tr>
|
| 206 |
+
<tr>
|
| 207 |
+
<td align="center">WebWeaver (Claude-sonnet-4)</td>
|
| 208 |
+
<td align="center">96.77</td>
|
| 209 |
+
<td align="center">90.50</td>
|
| 210 |
+
<td align="center">99.87</td>
|
| 211 |
+
<td align="center">94.30</td>
|
| 212 |
+
<td align="center">100.00</td>
|
| 213 |
+
<td align="center">98.73</td>
|
| 214 |
+
<td align="center">97.22</td>
|
| 215 |
+
</tr>
|
| 216 |
+
<tr>
|
| 217 |
+
<td align="center">AgentCPM-Report</td>
|
| 218 |
+
<td align="center">98.48</td>
|
| 219 |
+
<td align="center">95.1</td>
|
| 220 |
+
<td align="center">100.0</td>
|
| 221 |
+
<td align="center">98.5</td>
|
| 222 |
+
<td align="center">100.0</td>
|
| 223 |
+
<td align="center">97.3</td>
|
| 224 |
+
<td align="center">100.0</td>
|
| 225 |
+
</tr>
|
| 226 |
+
</tbody>
|
| 227 |
+
</table>
|
| 228 |
+
|
| 229 |
+
<table align="center">
|
| 230 |
+
<thead>
|
| 231 |
+
<tr>
|
| 232 |
+
<th align="center">DeepConsult</th>
|
| 233 |
+
<th align="center">Avg.</th>
|
| 234 |
+
<th align="center">Win</th>
|
| 235 |
+
<th align="center">Tie</th>
|
| 236 |
+
<th align="center">Lose</th>
|
| 237 |
+
</tr>
|
| 238 |
+
</thead>
|
| 239 |
+
<tbody>
|
| 240 |
+
<tr>
|
| 241 |
+
<td align="center">Doubao-research</td>
|
| 242 |
+
<td align="center">5.42</td>
|
| 243 |
+
<td align="center">29.95</td>
|
| 244 |
+
<td align="center">40.35</td>
|
| 245 |
+
<td align="center">29.7</td>
|
| 246 |
+
</tr>
|
| 247 |
+
<tr>
|
| 248 |
+
<td align="center">Claude-research</td>
|
| 249 |
+
<td align="center">4.6</td>
|
| 250 |
+
<td align="center">25</td>
|
| 251 |
+
<td align="center">38.89</td>
|
| 252 |
+
<td align="center">36.11</td>
|
| 253 |
+
</tr>
|
| 254 |
+
<tr>
|
| 255 |
+
<td align="center">OpenAI-deepresearch</td>
|
| 256 |
+
<td align="center">5</td>
|
| 257 |
+
<td align="center">0</td>
|
| 258 |
+
<td align="center">100</td>
|
| 259 |
+
<td align="center">0</td>
|
| 260 |
+
</tr>
|
| 261 |
+
<tr>
|
| 262 |
+
<td align="center">Gemini-2.5-Pro-deepresearch</td>
|
| 263 |
+
<td align="center">6.7</td>
|
| 264 |
+
<td align="center">61.27</td>
|
| 265 |
+
<td align="center">31.13</td>
|
| 266 |
+
<td align="center">7.6</td>
|
| 267 |
+
</tr>
|
| 268 |
+
<tr>
|
| 269 |
+
<td align="center">WebWeaver(Qwen3-30B-A3B)</td>
|
| 270 |
+
<td align="center">4.57</td>
|
| 271 |
+
<td align="center">28.65</td>
|
| 272 |
+
<td align="center">34.9</td>
|
| 273 |
+
<td align="center">36.46</td>
|
| 274 |
+
</tr>
|
| 275 |
+
<tr>
|
| 276 |
+
<td align="center">WebWeaver(Claude-Sonnet-4)</td>
|
| 277 |
+
<td align="center">6.96</td>
|
| 278 |
+
<td align="center">66.86</td>
|
| 279 |
+
<td align="center">10.47</td>
|
| 280 |
+
<td align="center">22.67</td>
|
| 281 |
+
</tr>
|
| 282 |
+
<tr>
|
| 283 |
+
<td align="center">Enterprise-DR(Gemini-2.5-Pro)</td>
|
| 284 |
+
<td align="center">6.82</td>
|
| 285 |
+
<td align="center">71.57</td>
|
| 286 |
+
<td align="center">19.12</td>
|
| 287 |
+
<td align="center">9.31</td>
|
| 288 |
+
</tr>
|
| 289 |
+
<tr>
|
| 290 |
+
<td align="center">RhinoInsigh(Gemini-2.5-Pro)</td>
|
| 291 |
+
<td align="center">6.82</td>
|
| 292 |
+
<td align="center">68.51</td>
|
| 293 |
+
<td align="center">11.02</td>
|
| 294 |
+
<td align="center">20.47</td>
|
| 295 |
+
</tr>
|
| 296 |
+
<tr>
|
| 297 |
+
<td align="center">AgentCPM-Report</td>
|
| 298 |
+
<td align="center">6.6</td>
|
| 299 |
+
<td align="center">57.6</td>
|
| 300 |
+
<td align="center">13.73</td>
|
| 301 |
+
<td align="center">28.68</td>
|
| 302 |
+
</tr>
|
| 303 |
+
</tbody>
|
| 304 |
+
</table>
|
| 305 |
+
|
| 306 |
+
Our evaluation datasets include DeepResearch Bench, DeepConsult, and DeepResearch Gym. The writing-time knowledge base includes about 2.7 million [Arxiv papers](https://www.kaggle.com/api/v1/datasets/download/Cornell-University/arxiv) and about 200,000 internal webpage summaries.
|
| 307 |
+
|
| 308 |
+
## Acknowledgements
|
| 309 |
+
This project would not be possible without the support and contributions of the open-source community. During development, we referred to and used multiple excellent open-source frameworks, models, and data resources, including [verl](https://github.com/volcengine/verl), [UltraRAG](https://github.com/OpenBMB/UltraRAG), [MiniCPM4.1](https://github.com/OpenBMB/MiniCPM4.1), and [SurveyGo](https://surveygo.modelbest.cn/).
|
| 310 |
+
|
| 311 |
+
## Contributions
|
| 312 |
+
Project leads: Yishan Li, Wentong Chen
|
| 313 |
+
|
| 314 |
+
Contributors: Yishan Li, Wentong Chen, Yukun Yan, Mingwei Li, Sen Mei, Xiaorong Wang, Kunpeng Liu, Xin Cong, Shuo Wang, Zhong Zhang, Yaxi Lu, Zhenghao Liu, Yankai Lin, Zhiyuan Liu, Maosong Sun
|
| 315 |
+
|
| 316 |
+
Advisors: Yukun Yan, Yankai Lin, Zhiyuan Liu, Maosong Sun
|
| 317 |
+
|
| 318 |
+
## Citation
|
| 319 |
+
|
| 320 |
+
If **AgentCPM-Report** is helpful for your research, please cite it as follows:
|
| 321 |
+
|
| 322 |
+
```bibtex
|
| 323 |
+
@software{AgentCPMReport2026,
|
| 324 |
+
title = {AgentCPM-Report: Gemini-2.5-pro-DeepResearch Level Local DeepResearch},
|
| 325 |
+
author = {Yishan Li, Wentong Chen, Yukun Yan, Mingwei Li, Sen Mei, Xiaorong Wang, Kunpeng Liu, Xin Cong, Shuo Wang, Zhong Zhang, Yaxi Lu, Zhenghao Liu, Yankai Lin, Zhiyuan Liu, Maosong Sun},
|
| 326 |
+
year = {2026},
|
| 327 |
+
url = {https://github.com/OpenBMB/AgentCPM}
|
| 328 |
+
}
|
| 329 |
+
```
|
added_tokens.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|execute_end|>": 73444,
|
| 3 |
+
"<|execute_start|>": 73443,
|
| 4 |
+
"<|fim_middle|>": 73446,
|
| 5 |
+
"<|fim_prefix|>": 73445,
|
| 6 |
+
"<|fim_suffix|>": 73447,
|
| 7 |
+
"<|im_end|>": 73440,
|
| 8 |
+
"<|im_start|>": 73441,
|
| 9 |
+
"<|tool_call|>": 73442
|
| 10 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{{'<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>' + '
|
| 3 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% if enable_thinking is defined and enable_thinking is false %}{{ '<think>
|
| 5 |
+
|
| 6 |
+
</think>
|
| 7 |
+
' }}{% endif %}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"MiniCPMForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_minicpm.MiniCPMConfig",
|
| 9 |
+
"AutoModel": "modeling_minicpm.MiniCPMForCausalLM",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_minicpm.MiniCPMForCausalLM",
|
| 11 |
+
"AutoModelForSeq2SeqLM": "modeling_minicpm.MiniCPMForCausalLM",
|
| 12 |
+
"AutoModelForSequenceClassification": "modeling_minicpm.MiniCPMForSequenceClassification"
|
| 13 |
+
},
|
| 14 |
+
"bos_token_id": 1,
|
| 15 |
+
"dim_model_base": 256,
|
| 16 |
+
"eos_token_id": 73440,
|
| 17 |
+
"hidden_act": "silu",
|
| 18 |
+
"hidden_size": 4096,
|
| 19 |
+
"initializer_range": 0.1,
|
| 20 |
+
"intermediate_size": 16384,
|
| 21 |
+
"max_position_embeddings": 65536,
|
| 22 |
+
"model_type": "minicpm",
|
| 23 |
+
"mup_denominator": 32,
|
| 24 |
+
"num_attention_heads": 32,
|
| 25 |
+
"num_hidden_layers": 32,
|
| 26 |
+
"num_key_value_heads": 2,
|
| 27 |
+
"pad_token_id": 73440,
|
| 28 |
+
"pretraining_tp": 1,
|
| 29 |
+
"rms_norm_eps": 1e-06,
|
| 30 |
+
"rope_scaling": {
|
| 31 |
+
"long_factor": [
|
| 32 |
+
0.9982316082870437,
|
| 33 |
+
1.033048153422584,
|
| 34 |
+
1.0749920956484724,
|
| 35 |
+
1.1255096879436193,
|
| 36 |
+
1.1863348602111476,
|
| 37 |
+
1.259543828902579,
|
| 38 |
+
1.3476188888731149,
|
| 39 |
+
1.4535223827776373,
|
| 40 |
+
1.5807816745852985,
|
| 41 |
+
1.7335856049489526,
|
| 42 |
+
1.9168922912975785,
|
| 43 |
+
2.1365471404135326,
|
| 44 |
+
2.3994084200118646,
|
| 45 |
+
2.713475511863602,
|
| 46 |
+
3.0880118452194134,
|
| 47 |
+
3.533650295140154,
|
| 48 |
+
4.062463396503134,
|
| 49 |
+
4.687974098908333,
|
| 50 |
+
5.425075306704039,
|
| 51 |
+
6.289818967956352,
|
| 52 |
+
7.29902962722721,
|
| 53 |
+
8.469695779093664,
|
| 54 |
+
9.81809877306655,
|
| 55 |
+
11.358657902065282,
|
| 56 |
+
13.102505860712087,
|
| 57 |
+
15.055862949967128,
|
| 58 |
+
17.218348131364184,
|
| 59 |
+
19.581439255386453,
|
| 60 |
+
22.127353314656723,
|
| 61 |
+
24.828633849376587,
|
| 62 |
+
27.6486820771775,
|
| 63 |
+
30.54334096108829,
|
| 64 |
+
33.46345345363812,
|
| 65 |
+
36.358112337548896,
|
| 66 |
+
39.17816056534983,
|
| 67 |
+
41.879441100069684,
|
| 68 |
+
44.425355159339965,
|
| 69 |
+
46.78844628336223,
|
| 70 |
+
48.95093146475928,
|
| 71 |
+
50.90428855401433,
|
| 72 |
+
52.648136512661125,
|
| 73 |
+
54.18869564165987,
|
| 74 |
+
55.537098635632745,
|
| 75 |
+
56.7077647874992,
|
| 76 |
+
57.71697544677006,
|
| 77 |
+
58.58171910802236,
|
| 78 |
+
59.31882031581807,
|
| 79 |
+
59.94433101822328,
|
| 80 |
+
60.47314411958625,
|
| 81 |
+
60.918782569507,
|
| 82 |
+
61.29331890286281,
|
| 83 |
+
61.60738599471455,
|
| 84 |
+
61.87024727431288,
|
| 85 |
+
62.089902123428836,
|
| 86 |
+
62.27320880977746,
|
| 87 |
+
62.42601274014111,
|
| 88 |
+
62.55327203194878,
|
| 89 |
+
62.65917552585329,
|
| 90 |
+
62.74725058582382,
|
| 91 |
+
62.82045955451526,
|
| 92 |
+
62.88128472678279,
|
| 93 |
+
62.931802319077946,
|
| 94 |
+
62.97374626130382,
|
| 95 |
+
63.008562806439365
|
| 96 |
+
],
|
| 97 |
+
"original_max_position_embeddings": 65536,
|
| 98 |
+
"rope_type": "longrope",
|
| 99 |
+
"short_factor": [
|
| 100 |
+
0.9982316082870437,
|
| 101 |
+
1.033048153422584,
|
| 102 |
+
1.0749920956484724,
|
| 103 |
+
1.1255096879436193,
|
| 104 |
+
1.1863348602111476,
|
| 105 |
+
1.259543828902579,
|
| 106 |
+
1.3476188888731149,
|
| 107 |
+
1.4535223827776373,
|
| 108 |
+
1.5807816745852985,
|
| 109 |
+
1.7335856049489526,
|
| 110 |
+
1.9168922912975785,
|
| 111 |
+
2.1365471404135326,
|
| 112 |
+
2.3994084200118646,
|
| 113 |
+
2.713475511863602,
|
| 114 |
+
3.0880118452194134,
|
| 115 |
+
3.533650295140154,
|
| 116 |
+
4.062463396503134,
|
| 117 |
+
4.687974098908333,
|
| 118 |
+
5.425075306704039,
|
| 119 |
+
6.289818967956352,
|
| 120 |
+
7.29902962722721,
|
| 121 |
+
8.469695779093664,
|
| 122 |
+
9.81809877306655,
|
| 123 |
+
11.358657902065282,
|
| 124 |
+
13.102505860712087,
|
| 125 |
+
15.055862949967128,
|
| 126 |
+
17.218348131364184,
|
| 127 |
+
19.581439255386453,
|
| 128 |
+
22.127353314656723,
|
| 129 |
+
24.828633849376587,
|
| 130 |
+
27.6486820771775,
|
| 131 |
+
30.54334096108829,
|
| 132 |
+
33.46345345363812,
|
| 133 |
+
36.358112337548896,
|
| 134 |
+
39.17816056534983,
|
| 135 |
+
41.879441100069684,
|
| 136 |
+
44.425355159339965,
|
| 137 |
+
46.78844628336223,
|
| 138 |
+
48.95093146475928,
|
| 139 |
+
50.90428855401433,
|
| 140 |
+
52.648136512661125,
|
| 141 |
+
54.18869564165987,
|
| 142 |
+
55.537098635632745,
|
| 143 |
+
56.7077647874992,
|
| 144 |
+
57.71697544677006,
|
| 145 |
+
58.58171910802236,
|
| 146 |
+
59.31882031581807,
|
| 147 |
+
59.94433101822328,
|
| 148 |
+
60.47314411958625,
|
| 149 |
+
60.918782569507,
|
| 150 |
+
61.29331890286281,
|
| 151 |
+
61.60738599471455,
|
| 152 |
+
61.87024727431288,
|
| 153 |
+
62.089902123428836,
|
| 154 |
+
62.27320880977746,
|
| 155 |
+
62.42601274014111,
|
| 156 |
+
62.55327203194878,
|
| 157 |
+
62.65917552585329,
|
| 158 |
+
62.74725058582382,
|
| 159 |
+
62.82045955451526,
|
| 160 |
+
62.88128472678279,
|
| 161 |
+
62.931802319077946,
|
| 162 |
+
62.97374626130382,
|
| 163 |
+
63.008562806439365
|
| 164 |
+
]
|
| 165 |
+
},
|
| 166 |
+
"rope_theta": 10000.0,
|
| 167 |
+
"scale_depth": 1.4,
|
| 168 |
+
"scale_emb": 12,
|
| 169 |
+
"sparse_config": null,
|
| 170 |
+
"tie_word_embeddings": false,
|
| 171 |
+
"torch_dtype": "bfloat16",
|
| 172 |
+
"transformers_version": "4.52.4",
|
| 173 |
+
"use_cache": false,
|
| 174 |
+
"vocab_size": 73448
|
| 175 |
+
}
|
configuration_minicpm.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2025 The OpenBMB Team. All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
""" MiniCPM model configuration"""
|
| 16 |
+
|
| 17 |
+
from transformers.configuration_utils import PretrainedConfig
|
| 18 |
+
from transformers.utils import logging
|
| 19 |
+
|
| 20 |
+
logger = logging.get_logger(__name__)
|
| 21 |
+
|
| 22 |
+
MINICPM_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class MiniCPMConfig(PretrainedConfig):
|
| 26 |
+
r"""
|
| 27 |
+
This is the configuration class to store the configuration of a [`MiniCPMModel`]. It is used to instantiate an MiniCPM
|
| 28 |
+
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
| 29 |
+
defaults will yield a similar configuration to that of the MiniCPM-7B.
|
| 30 |
+
|
| 31 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
| 32 |
+
documentation from [`PretrainedConfig`] for more information.
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
Args:
|
| 36 |
+
vocab_size (`int`, *optional*, defaults to 32000):
|
| 37 |
+
Vocabulary size of the MiniCPM model. Defines the number of different tokens that can be represented by the
|
| 38 |
+
`inputs_ids` passed when calling [`MiniCPMModel`]
|
| 39 |
+
hidden_size (`int`, *optional*, defaults to 4096):
|
| 40 |
+
Dimension of the hidden representations.
|
| 41 |
+
intermediate_size (`int`, *optional*, defaults to 11008):
|
| 42 |
+
Dimension of the MLP representations.
|
| 43 |
+
num_hidden_layers (`int`, *optional*, defaults to 32):
|
| 44 |
+
Number of hidden layers in the Transformer decoder.
|
| 45 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
| 46 |
+
Number of attention heads for each attention layer in the Transformer decoder.
|
| 47 |
+
num_key_value_heads (`int`, *optional*):
|
| 48 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
| 49 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
| 50 |
+
`num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
| 51 |
+
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
|
| 52 |
+
by meanpooling all the original heads within that group. For more details checkout [this
|
| 53 |
+
paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
|
| 54 |
+
`num_attention_heads`.
|
| 55 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
| 56 |
+
The non-linear activation function (function or string) in the decoder.
|
| 57 |
+
max_position_embeddings (`int`, *optional*, defaults to 2048):
|
| 58 |
+
The maximum sequence length that this model might ever be used with. MiniCPM 1 supports up to 2048 tokens,
|
| 59 |
+
MiniCPM 2 up to 4096, CodeMiniCPM up to 16384.
|
| 60 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
| 61 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 62 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-06):
|
| 63 |
+
The epsilon used by the rms normalization layers.
|
| 64 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
| 65 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
| 66 |
+
relevant if `config.is_decoder=True`.
|
| 67 |
+
pad_token_id (`int`, *optional*):
|
| 68 |
+
Padding token id.
|
| 69 |
+
bos_token_id (`int`, *optional*, defaults to 1):
|
| 70 |
+
Beginning of stream token id.
|
| 71 |
+
eos_token_id (`int`, *optional*, defaults to 2):
|
| 72 |
+
End of stream token id.
|
| 73 |
+
pretraining_tp (`int`, *optional*, defaults to 1):
|
| 74 |
+
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
|
| 75 |
+
document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
|
| 76 |
+
necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
|
| 77 |
+
issue](https://github.com/pytorch/pytorch/issues/76232).
|
| 78 |
+
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
|
| 79 |
+
Whether to tie weight embeddings
|
| 80 |
+
rope_theta (`float`, *optional*, defaults to 10000.0):
|
| 81 |
+
The base period of the RoPE embeddings.
|
| 82 |
+
rope_scaling (`Dict`, *optional*):
|
| 83 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
|
| 84 |
+
strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
|
| 85 |
+
`{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
|
| 86 |
+
`max_position_embeddings` to the expected new maximum. See the following thread for more information on how
|
| 87 |
+
these scaling strategies behave:
|
| 88 |
+
https://www.reddit.com/r/LocalMiniCPM/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
|
| 89 |
+
experimental feature, subject to breaking API changes in future versions.
|
| 90 |
+
attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
|
| 91 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 92 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 93 |
+
The dropout ratio for the attention probabilities.
|
| 94 |
+
|
| 95 |
+
```python
|
| 96 |
+
>>> from transformers import MiniCPMModel, MiniCPMConfig
|
| 97 |
+
|
| 98 |
+
>>> # Initializing a MiniCPM minicpm-7b style configuration
|
| 99 |
+
>>> configuration = MiniCPMConfig()
|
| 100 |
+
|
| 101 |
+
>>> # Initializing a model from the minicpm-7b style configuration
|
| 102 |
+
>>> model = MiniCPMModel(configuration)
|
| 103 |
+
|
| 104 |
+
>>> # Accessing the model configuration
|
| 105 |
+
>>> configuration = model.config
|
| 106 |
+
```"""
|
| 107 |
+
|
| 108 |
+
model_type = 'minicpm'
|
| 109 |
+
keys_to_ignore_at_inference = ['past_key_values']
|
| 110 |
+
|
| 111 |
+
def __init__(
|
| 112 |
+
self,
|
| 113 |
+
vocab_size=32000,
|
| 114 |
+
hidden_size=4096,
|
| 115 |
+
intermediate_size=11008,
|
| 116 |
+
num_hidden_layers=32,
|
| 117 |
+
num_attention_heads=32,
|
| 118 |
+
num_key_value_heads=None,
|
| 119 |
+
hidden_act='silu',
|
| 120 |
+
max_position_embeddings=2048,
|
| 121 |
+
initializer_range=0.02,
|
| 122 |
+
rms_norm_eps=1e-6,
|
| 123 |
+
use_cache=True,
|
| 124 |
+
pad_token_id=None,
|
| 125 |
+
bos_token_id=1,
|
| 126 |
+
eos_token_id=2,
|
| 127 |
+
pretraining_tp=1,
|
| 128 |
+
tie_word_embeddings=True,
|
| 129 |
+
rope_theta=10000.0,
|
| 130 |
+
rope_scaling=None,
|
| 131 |
+
attention_bias=False,
|
| 132 |
+
attention_dropout=0.0,
|
| 133 |
+
scale_emb=1,
|
| 134 |
+
dim_model_base=1,
|
| 135 |
+
scale_depth=1,
|
| 136 |
+
mup_denominator=32,
|
| 137 |
+
sparse_config=None,
|
| 138 |
+
**kwargs):
|
| 139 |
+
|
| 140 |
+
self.vocab_size = vocab_size
|
| 141 |
+
self.max_position_embeddings = max_position_embeddings
|
| 142 |
+
self.hidden_size = hidden_size
|
| 143 |
+
self.intermediate_size = intermediate_size
|
| 144 |
+
self.num_hidden_layers = num_hidden_layers
|
| 145 |
+
self.num_attention_heads = num_attention_heads
|
| 146 |
+
|
| 147 |
+
# for backward compatibility
|
| 148 |
+
if num_key_value_heads is None:
|
| 149 |
+
num_key_value_heads = num_attention_heads
|
| 150 |
+
|
| 151 |
+
self.num_key_value_heads = num_key_value_heads
|
| 152 |
+
self.hidden_act = hidden_act
|
| 153 |
+
self.initializer_range = initializer_range
|
| 154 |
+
self.rms_norm_eps = rms_norm_eps
|
| 155 |
+
self.pretraining_tp = pretraining_tp
|
| 156 |
+
self.use_cache = use_cache
|
| 157 |
+
self.rope_theta = rope_theta
|
| 158 |
+
self.rope_scaling = rope_scaling
|
| 159 |
+
# self._rope_scaling_validation()
|
| 160 |
+
self.attention_bias = attention_bias
|
| 161 |
+
self.attention_dropout = attention_dropout
|
| 162 |
+
self.scale_emb = scale_emb
|
| 163 |
+
self.dim_model_base = dim_model_base
|
| 164 |
+
self.scale_depth = scale_depth
|
| 165 |
+
# only used for Eagle Head
|
| 166 |
+
self.mup_denominator = mup_denominator
|
| 167 |
+
|
| 168 |
+
# sparse config
|
| 169 |
+
self.sparse_config = sparse_config
|
| 170 |
+
|
| 171 |
+
super().__init__(
|
| 172 |
+
pad_token_id=pad_token_id,
|
| 173 |
+
bos_token_id=bos_token_id,
|
| 174 |
+
eos_token_id=eos_token_id,
|
| 175 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 176 |
+
**kwargs,
|
| 177 |
+
)
|
| 178 |
+
try:
|
| 179 |
+
import flash_attn
|
| 180 |
+
self._attn_implementation = 'flash_attention_2'
|
| 181 |
+
except:
|
| 182 |
+
pass
|
| 183 |
+
|
| 184 |
+
def _rope_scaling_validation(self):
|
| 185 |
+
"""
|
| 186 |
+
Validate the `rope_scaling` configuration.
|
| 187 |
+
"""
|
| 188 |
+
if self.rope_scaling is None:
|
| 189 |
+
return
|
| 190 |
+
|
| 191 |
+
if not isinstance(self.rope_scaling, dict) or len(self.rope_scaling) != 2:
|
| 192 |
+
raise ValueError(
|
| 193 |
+
'`rope_scaling` must be a dictionary with with two fields, `type` and `factor`, '
|
| 194 |
+
f'got {self.rope_scaling}'
|
| 195 |
+
)
|
| 196 |
+
rope_scaling_type = self.rope_scaling.get('type', None)
|
| 197 |
+
rope_scaling_factor = self.rope_scaling.get('factor', None)
|
| 198 |
+
if rope_scaling_type is None or rope_scaling_type not in ['linear', 'dynamic']:
|
| 199 |
+
raise ValueError(
|
| 200 |
+
f"`rope_scaling`'s type field must be one of ['linear', 'dynamic'], got {rope_scaling_type}"
|
| 201 |
+
)
|
| 202 |
+
if rope_scaling_factor is None or not isinstance(rope_scaling_factor, float) or rope_scaling_factor <= 1.0:
|
| 203 |
+
raise ValueError(f"`rope_scaling`'s factor field must be a float > 1, got {rope_scaling_factor}")
|
generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 73440,
|
| 5 |
+
"pad_token_id": 73440,
|
| 6 |
+
"transformers_version": "4.52.4",
|
| 7 |
+
"use_cache": false
|
| 8 |
+
}
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb87fe4d53fac748e13937c91a203f55fa47568af95c5928d55c351058e81d93
|
| 3 |
+
size 4968138392
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e085343a653f2a7a59fa2a606b8e3a4922e324ae400a5f48b1fd831b1e910c3a
|
| 3 |
+
size 4957610128
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:323fb1bb60247c2e0bb581a2399b43d504872a677892a41e46ccac5f1b83ffdf
|
| 3 |
+
size 4949487768
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7de50a0ba3442d16341142dd1b61dded2c7276c26394b05191a075cb1594f4b7
|
| 3 |
+
size 1495305288
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 16370507776
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"lm_head.weight": "model-00002-of-00004.safetensors",
|
| 7 |
+
"model.embed_tokens.weight": "model-00001-of-00004.safetensors",
|
| 8 |
+
"model.layers.0.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 9 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 10 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 11 |
+
"model.layers.0.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
|
| 12 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 13 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 14 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 15 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 16 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
| 17 |
+
"model.layers.1.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 18 |
+
"model.layers.1.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 19 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 20 |
+
"model.layers.1.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 21 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
|
| 22 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 23 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 24 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 25 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 26 |
+
"model.layers.10.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 27 |
+
"model.layers.10.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 28 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 29 |
+
"model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 30 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 31 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 32 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 33 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 34 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 35 |
+
"model.layers.11.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 36 |
+
"model.layers.11.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 37 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 38 |
+
"model.layers.11.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 39 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 40 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 41 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 42 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 43 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 44 |
+
"model.layers.12.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 45 |
+
"model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 46 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 47 |
+
"model.layers.12.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 48 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 49 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 50 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 51 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 52 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 53 |
+
"model.layers.13.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 54 |
+
"model.layers.13.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 55 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 56 |
+
"model.layers.13.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 57 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 58 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
|
| 59 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 60 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
| 61 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 62 |
+
"model.layers.14.input_layernorm.weight": "model-00004-of-00004.safetensors",
|
| 63 |
+
"model.layers.14.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 64 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
|
| 65 |
+
"model.layers.14.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
|
| 66 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
|
| 67 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
|
| 68 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 69 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 70 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 71 |
+
"model.layers.15.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 72 |
+
"model.layers.15.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 73 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 74 |
+
"model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 75 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 76 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 77 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
|
| 78 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 79 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
| 80 |
+
"model.layers.16.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 81 |
+
"model.layers.16.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 82 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 83 |
+
"model.layers.16.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 84 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 85 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 86 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 87 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 88 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 89 |
+
"model.layers.17.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 90 |
+
"model.layers.17.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 91 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 92 |
+
"model.layers.17.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 93 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 94 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 95 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 96 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
|
| 97 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 98 |
+
"model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 99 |
+
"model.layers.18.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 100 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 101 |
+
"model.layers.18.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 102 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 103 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 104 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
|
| 105 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 106 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 107 |
+
"model.layers.19.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 108 |
+
"model.layers.19.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 109 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 110 |
+
"model.layers.19.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 111 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 112 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 113 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 114 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 115 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 116 |
+
"model.layers.2.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 117 |
+
"model.layers.2.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 118 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 119 |
+
"model.layers.2.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 120 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 121 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 122 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 123 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 124 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 125 |
+
"model.layers.20.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 126 |
+
"model.layers.20.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 127 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 128 |
+
"model.layers.20.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 129 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 130 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 131 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 132 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 133 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 134 |
+
"model.layers.21.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 135 |
+
"model.layers.21.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 136 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 137 |
+
"model.layers.21.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 138 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 139 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 140 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 141 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
|
| 142 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 143 |
+
"model.layers.22.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 144 |
+
"model.layers.22.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 145 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 146 |
+
"model.layers.22.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 147 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 148 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 149 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 150 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 151 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
| 152 |
+
"model.layers.23.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 153 |
+
"model.layers.23.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 154 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 155 |
+
"model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 156 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 157 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 158 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 159 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 160 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 161 |
+
"model.layers.24.input_layernorm.weight": "model-00004-of-00004.safetensors",
|
| 162 |
+
"model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 163 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 164 |
+
"model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 165 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 166 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 167 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 168 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 169 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 170 |
+
"model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 171 |
+
"model.layers.25.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 172 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 173 |
+
"model.layers.25.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 174 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 175 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 176 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 177 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 178 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 179 |
+
"model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 180 |
+
"model.layers.26.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 181 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 182 |
+
"model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 183 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 184 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 185 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 186 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
| 187 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 188 |
+
"model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 189 |
+
"model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 190 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 191 |
+
"model.layers.27.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 192 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 193 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 194 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 195 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
| 196 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 197 |
+
"model.layers.28.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 198 |
+
"model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 199 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 200 |
+
"model.layers.28.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 201 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 202 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
|
| 203 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 204 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 205 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 206 |
+
"model.layers.29.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 207 |
+
"model.layers.29.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 208 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 209 |
+
"model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 210 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 211 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 212 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 213 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
|
| 214 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 215 |
+
"model.layers.3.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 216 |
+
"model.layers.3.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 217 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 218 |
+
"model.layers.3.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 219 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 220 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 221 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 222 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 223 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 224 |
+
"model.layers.30.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 225 |
+
"model.layers.30.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 226 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 227 |
+
"model.layers.30.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 228 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 229 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 230 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 231 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 232 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
|
| 233 |
+
"model.layers.31.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 234 |
+
"model.layers.31.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 235 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
|
| 236 |
+
"model.layers.31.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 237 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 238 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 239 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 240 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 241 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 242 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 243 |
+
"model.layers.4.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 244 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 245 |
+
"model.layers.4.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
|
| 246 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 247 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 248 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
|
| 249 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 250 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
| 251 |
+
"model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 252 |
+
"model.layers.5.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
|
| 253 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
|
| 254 |
+
"model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 255 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 256 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 257 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 258 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 259 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
|
| 260 |
+
"model.layers.6.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 261 |
+
"model.layers.6.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
|
| 262 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
|
| 263 |
+
"model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 264 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 265 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
|
| 266 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 267 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 268 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 269 |
+
"model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 270 |
+
"model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
|
| 271 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 272 |
+
"model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 273 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
|
| 274 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
|
| 275 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 276 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 277 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
|
| 278 |
+
"model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
|
| 279 |
+
"model.layers.8.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 280 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 281 |
+
"model.layers.8.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
|
| 282 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 283 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
|
| 284 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
|
| 285 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
|
| 286 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 287 |
+
"model.layers.9.input_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 288 |
+
"model.layers.9.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
|
| 289 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
|
| 290 |
+
"model.layers.9.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
|
| 291 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
|
| 292 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
|
| 293 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
|
| 294 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
|
| 295 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
|
| 296 |
+
"model.norm.weight": "model-00002-of-00004.safetensors"
|
| 297 |
+
}
|
| 298 |
+
}
|
modeling_minicpm.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_end|>",
|
| 4 |
+
"<|im_start|>",
|
| 5 |
+
"<|tool_call|>",
|
| 6 |
+
"<|execute_start|>",
|
| 7 |
+
"<|execute_end|>",
|
| 8 |
+
"<|fim_prefix|>",
|
| 9 |
+
"<|fim_middle|>",
|
| 10 |
+
"<|fim_suffix|>"
|
| 11 |
+
],
|
| 12 |
+
"bos_token": {
|
| 13 |
+
"content": "<s>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false
|
| 18 |
+
},
|
| 19 |
+
"eos_token": {
|
| 20 |
+
"content": "<|im_end|>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"pad_token": {
|
| 27 |
+
"content": "<|im_end|>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
},
|
| 33 |
+
"unk_token": {
|
| 34 |
+
"content": "<unk>",
|
| 35 |
+
"lstrip": false,
|
| 36 |
+
"normalized": false,
|
| 37 |
+
"rstrip": false,
|
| 38 |
+
"single_word": false
|
| 39 |
+
}
|
| 40 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb74d51116831c3bf65db812c553f94ab0c88dcf97a5bbb37e3504f6d359c530
|
| 3 |
+
size 1181204
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<unk>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"2": {
|
| 23 |
+
"content": "</s>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
},
|
| 30 |
+
"73440": {
|
| 31 |
+
"content": "<|im_end|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"73441": {
|
| 39 |
+
"content": "<|im_start|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"73442": {
|
| 47 |
+
"content": "<|tool_call|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"73443": {
|
| 55 |
+
"content": "<|execute_start|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"73444": {
|
| 63 |
+
"content": "<|execute_end|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
+
},
|
| 70 |
+
"73445": {
|
| 71 |
+
"content": "<|fim_prefix|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": true
|
| 77 |
+
},
|
| 78 |
+
"73446": {
|
| 79 |
+
"content": "<|fim_middle|>",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"rstrip": false,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": true
|
| 85 |
+
},
|
| 86 |
+
"73447": {
|
| 87 |
+
"content": "<|fim_suffix|>",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"rstrip": false,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": true
|
| 93 |
+
}
|
| 94 |
+
},
|
| 95 |
+
"additional_special_tokens": [
|
| 96 |
+
"<|im_end|>",
|
| 97 |
+
"<|im_start|>",
|
| 98 |
+
"<|tool_call|>",
|
| 99 |
+
"<|execute_start|>",
|
| 100 |
+
"<|execute_end|>",
|
| 101 |
+
"<|fim_prefix|>",
|
| 102 |
+
"<|fim_middle|>",
|
| 103 |
+
"<|fim_suffix|>"
|
| 104 |
+
],
|
| 105 |
+
"bos_token": "<s>",
|
| 106 |
+
"clean_up_tokenization_spaces": false,
|
| 107 |
+
"eos_token": "<|im_end|>",
|
| 108 |
+
"extra_special_tokens": {},
|
| 109 |
+
"legacy": true,
|
| 110 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 111 |
+
"pad_token": "<|im_end|>",
|
| 112 |
+
"padding_side": "right",
|
| 113 |
+
"sp_model_kwargs": {},
|
| 114 |
+
"spaces_between_special_tokens": false,
|
| 115 |
+
"split_special_tokens": false,
|
| 116 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 117 |
+
"unk_token": "<unk>",
|
| 118 |
+
"use_default_system_prompt": false
|
| 119 |
+
}
|