初始化项目,由ModelHub XC社区提供模型

Model: deepseek-ai/DeepSeek-Prover-V2-7B
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-15 04:42:51 +08:00
commit 7b092d975b
10 changed files with 200607 additions and 0 deletions

49
.gitattributes vendored Normal file
View File

@@ -0,0 +1,49 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bin.* filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zstandard filter=lfs diff=lfs merge=lfs -text
*.tfevents* filter=lfs diff=lfs merge=lfs -text
*.db* filter=lfs diff=lfs merge=lfs -text
*.ark* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.gguf* filter=lfs diff=lfs merge=lfs -text
*.ggml filter=lfs diff=lfs merge=lfs -text
*.llamafile* filter=lfs diff=lfs merge=lfs -text
*.pt2 filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
model-00001-of-000002.safetensors filter=lfs diff=lfs merge=lfs -text
model-00002-of-000002.safetensors filter=lfs diff=lfs merge=lfs -text

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 DeepSeek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

170
README.md Normal file
View File

@@ -0,0 +1,170 @@
<!-- markdownlint-disable first-line-h1 -->
<!-- markdownlint-disable html -->
<!-- markdownlint-disable no-duplicate-header -->
<div align="center">
<img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek-V3" />
</div>
<hr>
<div align="center" style="line-height: 1;">
<a href="https://www.deepseek.com/" target="_blank" style="margin: 2px;">
<img alt="Homepage" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
</a>
<a href="https://chat.deepseek.com/" target="_blank" style="margin: 2px;">
<img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V3-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
</a>
<a href="https://huggingface.co/deepseek-ai" target="_blank" style="margin: 2px;">
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
</a>
</div>
<div align="center" style="line-height: 1;">
<a href="https://discord.gg/Tc7c45Zzu5" target="_blank" style="margin: 2px;">
<img alt="Discord" src="https://img.shields.io/badge/Discord-DeepSeek%20AI-7289da?logo=discord&logoColor=white&color=7289da" style="display: inline-block; vertical-align: middle;"/>
</a>
<a href="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/qr.jpeg?raw=true" target="_blank" style="margin: 2px;">
<img alt="Wechat" src="https://img.shields.io/badge/WeChat-DeepSeek%20AI-brightgreen?logo=wechat&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
</a>
<a href="https://twitter.com/deepseek_ai" target="_blank" style="margin: 2px;">
<img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-deepseek_ai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
</a>
</div>
<div align="center" style="line-height: 1;">
<a href="https://github.com/deepseek-ai/DeepSeek-V3/blob/main/LICENSE-CODE" style="margin: 2px;">
<img alt="Code License" src="https://img.shields.io/badge/Code_License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
</a>
<a href="https://github.com/deepseek-ai/DeepSeek-V3/blob/main/LICENSE-MODEL" style="margin: 2px;">
<img alt="Model License" src="https://img.shields.io/badge/Model_License-Model_Agreement-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
</a>
</div>
## 1. Introduction
We introduce DeepSeek-Prover-V2, an open-source large language model designed for formal theorem proving in Lean 4, with initialization data collected through a recursive theorem proving pipeline powered by DeepSeek-V3. The cold-start training procedure begins by prompting DeepSeek-V3 to decompose complex problems into a series of subgoals. The proofs of resolved subgoals are synthesized into a chain-of-thought process, combined with DeepSeek-V3's step-by-step reasoning, to create an initial cold start for reinforcement learning. This process enables us to integrate both informal and formal mathematical reasoning into a unified model.
<p align="center">
<img width="100%" src="https://github.com/deepseek-ai/DeepSeek-Prover-V2/blob/main/figures/performance.png?raw=true">
</p>
## 2. Model Summary
---
**Synthesize Cold-Start Reasoning Data through Recursive Proof Search**
- To construct the cold-start dataset, we develop a simple yet effective pipeline for recursive theorem proving, utilizing DeepSeek-V3 as a unified tool for both subgoal decomposition and formalization. We prompt DeepSeek-V3 to decompose theorems into high-level proof sketches while simultaneously formalizing these proof steps in Lean 4, resulting in a sequence of subgoals.
- We use a smaller 7B model to handle the proof search for each subgoal, thereby reducing the associated computational burden. Once the decomposed steps of a challenging problem are resolved, we pair the complete step-by-step formal proof with the corresponding chain-of-thought from DeepSeek-V3 to create cold-start reasoning data.
---
**Reinforcement Learning with Synthetic Cold-Start Data**
- We curate a subset of challenging problems that remain unsolved by the 7B prover model in an end-to-end manner, but for which all decomposed subgoals have been successfully resolved. By composing the proofs of all subgoals, we construct a complete formal proof for the original problem. This proof is then appended to DeepSeek-V3's chain-of-thought, which outlines the corresponding lemma decomposition, thereby producing a cohesive synthesis of informal reasoning and subsequent formalization.
- After fine-tuning the prover model on the synthetic cold-start data, we perform a reinforcement learning stage to further enhance its ability to bridge informal reasoning with formal proof construction. Following the standard training objective for reasoning models, we use binary correct-or-incorrect feedback as the primary form of reward supervision.
- The resulting model, DeepSeek-Prover-V2-671B, achieves state-of-the-art performance in neural theorem proving, reaching $88.9$% pass ratio on the MiniF2F-test and solving 49 out of 658 problems from PutnamBench. The proofs generated by DeepSeek-Prover-V2 for the miniF2F dataset are available for download as a [ZIP archive](https://github.com/deepseek-ai/DeepSeek-Prover-V2/blob/master/minif2f-solutions.zip).
---
## 3. ProverBench: Formalization of AIME and Textbook Problems
we introduce ProverBench, a benchmark dataset comprising 325 problems. Of these, 15 are formalized from number theory and algebra questions featured in the recent AIME competitions (AIME 24 and 25), offering authentic high-school competition-level challenges. The remaining 310 problems are drawn from curated textbook examples and educational tutorials, contributing a diverse and pedagogically grounded collection of formalized mathematical problems. This benchmark is designed to enable more comprehensive evaluation across both high-school competition problems and undergraduate-level mathematics.
<div align="center">
| Area | Count |
| :---------------------: | :-------: |
| AIME 24&25 | 15 |
| Number Theory | 40 |
| Elementary Algebra | 30 |
| Linear Algebra | 50 |
| Abstract Algebra | 40 |
| Calculus | 90 |
| Real Analysis | 30 |
| Complex Analysis | 10 |
| Functional Analysis | 10 |
| Probability | 10 |
| Total | 325 |
</div>
## 4. Model & Dataset Downloads
We release DeepSeek-Prover-V2 in two model sizes: 7B and 671B parameters. DeepSeek-Prover-V2-671B is trained on top of DeepSeek-V3-Base. DeepSeek-Prover-V2-7B is built upon DeepSeek-Prover-V1.5-Base and features an extended context length of up to 32K tokens.
<div align="center">
| **Model** | **Download** |
| :-----------------------------: | :----------------------------------------------------------: |
| DeepSeek-Prover-V2-7B | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-Prover-V2-7B) |
| DeepSeek-Prover-V2-671B | [🤗 HuggingFace](https://huggingface.co/deepseek-ai/DeepSeek-Prover-V2-671B) |
</div>
<div align="center">
| **Dataset** | **Download** |
| :-----------------------------: | :----------------------------------------------------------: |
| DeepSeek-ProverBench | [🤗 HuggingFace](https://huggingface.co/datasets/deepseek-ai/DeepSeek-ProverBench) |
</div>
## 5. Quick Start
You can directly use [Huggingface's Transformers](https://github.com/huggingface/transformers) for model inference. DeepSeek-Prover-V2-671B shares the same architecture as DeepSeek-V3. For detailed information and supported features, please refer to [the DeepSeek-V3 documentation on Hugging Face](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/deepseek_v3.md).
The following is a basic example of generating a proof for a problem from the miniF2F dataset:
````python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(30)
model_id = "DeepSeek-Prover-V2-7B" # or DeepSeek-Prover-V2-671B
tokenizer = AutoTokenizer.from_pretrained(model_id)
formal_statement = """
import Mathlib
import Aesop
set_option maxHeartbeats 0
open BigOperators Real Nat Topology Rat
/-- What is the positive difference between $120\%$ of 30 and $130\%$ of 20? Show that it is 10.-/
theorem mathd_algebra_10 : abs ((120 : ) / 100 * 30 - 130 / 100 * 20) = 10 := by
sorry
""".strip()
prompt = """
Complete the following Lean 4 code:
```lean4
{}
```
Before producing the Lean 4 code to formally prove the given theorem, provide a detailed proof plan outlining the main proof steps and strategies.
The plan should highlight key ideas, intermediate lemmas, and proof structures that will guide the construction of the final formal proof.
""".strip()
chat = [
{"role": "user", "content": prompt.format(formal_statement)},
]
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
inputs = tokenizer.apply_chat_template(chat, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
import time
start = time.time()
outputs = model.generate(inputs, max_new_tokens=8192)
print(tokenizer.batch_decode(outputs))
print(time.time() - start)
````
## 6. License
The use of DeepSeek-Prover-V2 models is subject to [the Model License](LICENSE-MODEL).
## 7. Contact
If you have any questions, please raise an issue or contact us at [service@deepseek.com](mailto:service@deepseek.com).

36
config.json Normal file
View File

@@ -0,0 +1,36 @@
{
"architectures": [
"LlamaForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 100000,
"eos_token_id": 100001,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.02,
"intermediate_size": 11008,
"max_position_embeddings": 65536,
"mlp_bias": false,
"model_type": "llama",
"num_attention_heads": 32,
"num_hidden_layers": 30,
"num_key_value_heads": 32,
"pretraining_tp": 1,
"rms_norm_eps": 1e-06,
"rope_scaling": {
"beta_fast": 32,
"beta_slow": 1,
"factor": 16,
"mscale": true,
"original_max_position_embeddings": 4096,
"type": "yarn"
},
"rope_theta": 10000,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.46.3",
"use_cache": true,
"vocab_size": 102400
}

1
configuration.json Normal file
View File

@@ -0,0 +1 @@
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7eebe5f578ccfa90eea70b00c164adff6df2bdec511b9939c101234c3e3ae65
size 8596557586

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7dd518c7ca44e82a7bda20f1959bd131b89f721c70fb3bc2e9ac0b53ad2c4ce9
size 5224205544

View File

@@ -0,0 +1,280 @@
{
"metadata": {
"total_size": 13820731392
},
"weight_map": {
"model.embed_tokens.weight": "model-00001-of-000002.safetensors",
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.0.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.1.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.2.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.3.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.4.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.5.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.6.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.6.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.6.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.7.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.7.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.8.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.8.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.8.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.9.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.9.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.10.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.10.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.11.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.11.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.12.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.12.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.12.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.13.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.13.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.13.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.14.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.14.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.14.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.15.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.15.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.15.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.16.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.16.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.16.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.17.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.17.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.17.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.18.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.self_attn.v_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.self_attn.o_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.mlp.gate_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.mlp.up_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.mlp.down_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.18.input_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.18.post_attention_layernorm.weight": "model-00001-of-000002.safetensors",
"model.layers.19.self_attn.q_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.19.self_attn.k_proj.weight": "model-00001-of-000002.safetensors",
"model.layers.19.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.19.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.19.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.19.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.19.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.19.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.19.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.20.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.20.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.20.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.21.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.21.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.21.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.22.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.22.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.22.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.23.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.23.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.23.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.24.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.24.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.24.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.25.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.25.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.25.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.26.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.26.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.26.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.27.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.27.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.27.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.28.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.28.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.29.self_attn.q_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.self_attn.k_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.self_attn.v_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.mlp.gate_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.mlp.up_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.mlp.down_proj.weight": "model-00002-of-000002.safetensors",
"model.layers.29.input_layernorm.weight": "model-00002-of-000002.safetensors",
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-000002.safetensors",
"model.norm.weight": "model-00002-of-000002.safetensors",
"lm_head.weight": "model-00002-of-000002.safetensors"
}
}

200009
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

35
tokenizer_config.json Normal file
View File

@@ -0,0 +1,35 @@
{
"add_bos_token": true,
"add_eos_token": false,
"bos_token": {
"__type": "AddedToken",
"content": "<begin▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"clean_up_tokenization_spaces": false,
"eos_token": {
"__type": "AddedToken",
"content": "<end▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"legacy": true,
"model_max_length": 131072,
"pad_token": {
"__type": "AddedToken",
"content": "<end▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"sp_model_kwargs": {},
"unk_token": null,
"tokenizer_class": "LlamaTokenizerFast",
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true, is_last_user=false) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '\n\n' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{{ bos_token }}{{ ns.system_prompt }}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{%- set ns.is_first = false -%}{%- set ns.is_last_user = true -%}{{'<User>' + message['content'] + '<Assistant>'}}{%- endif %}{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{'<tool▁outputs▁end>'}}{%- endif %}{%- set ns.is_first = false %}{%- set ns.is_tool = false -%}{%- set ns.is_output_first = true %}{%- for tool in message['tool_calls'] %}{%- if not ns.is_first %}{%- if message['content'] is none %}{{'<tool▁calls▁begin><tool▁call▁begin>' + tool['type'] + '<tool▁sep>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<tool▁call▁end>'}}{%- else %}{{message['content'] + '<tool▁calls▁begin><tool▁call▁begin>' + tool['type'] + '<tool▁sep>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<tool▁call▁end>'}}{%- endif %}{%- set ns.is_first = true -%}{%- else %}{{'\n' + '<tool▁call▁begin>' + tool['type'] + '<tool▁sep>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<tool▁call▁end>'}}{%- endif %}{%- endfor %}{{'<tool▁calls▁end><end▁of▁sentence>'}}{%- endif %}{%- if message['role'] == 'assistant' and (message['tool_calls'] is not defined or message['tool_calls'] is none)%}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{'<tool▁outputs▁end>' + message['content'] + '<end▁of▁sentence>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{{content + '<end▁of▁sentence>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_last_user = false -%}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<tool▁outputs▁begin><tool▁output▁begin>' + message['content'] + '<tool▁output▁end>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\n<tool▁output▁begin>' + message['content'] + '<tool▁output▁end>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<tool▁outputs▁end>'}}{% endif %}{% if add_generation_prompt and not ns.is_last_user and not ns.is_tool %}{{'<Assistant>'}}{% endif %}"
}