初始化项目,由ModelHub XC社区提供模型
Model: m-a-p/OProver-8B-Round2 Source: Original Platform
This commit is contained in:
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
*.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
|
||||
|
||||
*.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
|
||||
|
||||
*.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
|
||||
|
||||
data.pt filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
merges.txt filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00001.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00002.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00003.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
model-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
vocab.json filter=lfs diff=lfs merge=lfs -text
|
||||
144
README.md
Normal file
144
README.md
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
language:
|
||||
- en
|
||||
library_name: transformers
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- lean4
|
||||
- theorem-proving
|
||||
- formal-mathematics
|
||||
- agentic
|
||||
- retrieval-augmented
|
||||
datasets:
|
||||
- m-a-p/OProofs
|
||||
---
|
||||
|
||||
# OProver
|
||||
|
||||
> A unified framework for **agentic formal theorem proving** in Lean 4.
|
||||
|
||||
- 📄 Paper: [OProver: A Unified Framework for Agentic Formal Theorem Proving](https://huggingface.co/papers/2605.17283) ([arXiv](https://arxiv.org/abs/2605.17283))
|
||||
- 📚 Collection: [m-a-p/OProver](https://huggingface.co/collections/m-a-p/oprover)
|
||||
- 📦 Dataset: [m-a-p/OProofs](https://huggingface.co/datasets/m-a-p/OProofs)
|
||||
|
||||
OProver treats theorem proving as a multi-round refinement loop. Given a target
|
||||
theorem, the prover retrieves top-k compiler-verified proofs from a memory of
|
||||
prior proofs, generates a proof attempt, runs the Lean 4 compiler, and—on
|
||||
failure—revises the attempt using the compiler feedback in the next round.
|
||||
The same retrieval and feedback signals are baked into training, so the
|
||||
training-time interface matches the proving-time interaction.
|
||||
|
||||
## Highlights
|
||||
|
||||
- **State-of-the-art among open-weight whole-proof provers.** OProver-32B
|
||||
attains the best Pass@32 on MiniF2F (93.3), ProverBench (58.2), and
|
||||
PutnamBench (11.3), and the second-best on MathOlympiad (22.8) and
|
||||
ProofNet (33.2). Even OProver-8B beats Goedel-Prover-V2-32B on all five
|
||||
benchmarks despite having 4× fewer parameters.
|
||||
- **Agentic proving is in the policy, not bolted on.** Retrieval, multi-turn
|
||||
compiler feedback, and iterative repair are all part of the trained policy.
|
||||
Ablations show feedback is the dominant driver: removing it costs OProver-32B
|
||||
4.9–7.4 Pass@32 points across benchmarks; removing retrieval on top adds
|
||||
0.5–1.7 more.
|
||||
- **Co-evolving prover and corpus.** Each post-training iteration runs agentic
|
||||
rollouts; verified proofs are added to OProofs and re-indexed for retrieval,
|
||||
repair trajectories become SFT data, and unresolved hard cases provide RL
|
||||
signal. MiniF2F-Test Pass@32 grows monotonically: OProver-8B 79.5 → 86.2 →
|
||||
87.0 → 91.8 across rounds; OProver-32B 84.7 → 88.1 → 93.3.
|
||||
|
||||
## What's in this release
|
||||
|
||||
The OProver collection ([m-a-p/OProver](https://huggingface.co/collections/m-a-p/oprover)) bundles the paper,
|
||||
the corpus, and seven model checkpoints covering both training stages and
|
||||
both model sizes:
|
||||
|
||||
| Repo | Stage | Size | Note |
|
||||
|---|---|---|---|
|
||||
| [OProver-8B-Base](https://huggingface.co/m-a-p/OProver-8B-Base) | Continued pretraining only | 8B | Domain-adapted base; before SFT/RL |
|
||||
| [OProver-32B-Base](https://huggingface.co/m-a-p/OProver-32B-Base) | Continued pretraining only | 32B | Domain-adapted base; before SFT/RL |
|
||||
| [OProver-8B-Round1](https://huggingface.co/m-a-p/OProver-8B-Round1) | Post-training Round 1 | 8B | After first SFT+RL iteration |
|
||||
| [OProver-8B-Round2](https://huggingface.co/m-a-p/OProver-8B-Round2) | Post-training Round 2 | 8B | After second SFT+RL iteration |
|
||||
| [OProver-32B-Round1](https://huggingface.co/m-a-p/OProver-32B-Round1) | Post-training Round 1 | 32B | After first SFT+RL iteration |
|
||||
| **[OProver-8B](https://huggingface.co/m-a-p/OProver-8B)** | Final | 8B | The 8B prover reported in the paper (Round 3) |
|
||||
| **[OProver-32B](https://huggingface.co/m-a-p/OProver-32B)** | Final | 32B | The 32B prover reported in the paper (Round 2) |
|
||||
| [OProofs](https://huggingface.co/datasets/m-a-p/OProofs) | Dataset | 6.86M proofs | Lean 4 corpus used for CPT, SFT, and the retrieval memory |
|
||||
|
||||
Use **OProver-8B** or **OProver-32B** for proving. The Base / Round-N
|
||||
checkpoints are released for reproducibility and ablation studies.
|
||||
|
||||
## Dataset: OProofs
|
||||
|
||||
OProofs is a large-scale Lean 4 corpus that doubles as the retrieval memory at
|
||||
proving time. It is built from three sources: public Lean resources
|
||||
(NuminaMath-LEAN, Lean-Workbook, Leanabell-FormalStmt, Goedel-Pset, …),
|
||||
large-scale autoformalization + agentic proof synthesis from informal math
|
||||
mined on Common Crawl and GitHub, and traces from OProver's own agentic
|
||||
proving runs.
|
||||
|
||||

|
||||
|
||||
## Training
|
||||
|
||||
Two stages, both anchored on OProofs.
|
||||
|
||||
**1. Continued pretraining (one-time).** A 65B-token mixture of formal
|
||||
Lean (≈30%, from OProofs), code (≈20%, OpenCoder), mathematics (≈40%,
|
||||
Nemotron-Math-4-Plus), and long-CoT (≈10%, ProLong-64K). AdamW, peak LR
|
||||
5e-5, cosine with 3% warmup, batch 512, sequence length 8192. Output:
|
||||
`OProver-{8B,32B}-Base`.
|
||||
|
||||
**2. Iterative post-training.** Each round runs:
|
||||
|
||||
1. Agentic proving with the current prover on a theorem pool, producing
|
||||
multi-round rollouts conditioned on retrieved proofs and Lean feedback.
|
||||
2. **SFT** on round-level repair examples `(s, R, p_{t-1}, f_{t-1}) → p_t`,
|
||||
with cross-entropy loss only on the new attempt.
|
||||
3. **GSPO RL** on hard cases (groups with non-trivial pass-rate). Per-round
|
||||
reward `r = 0.8 + 0.2·1[format ok]` if Lean-verified, else 0; advantages
|
||||
are pooled across the n×R rounds for the same theorem.
|
||||
4. Newly verified proofs and repair trajectories are folded back into OProofs
|
||||
and re-indexed into the retrieval memory for the next round.
|
||||
|
||||
## Results
|
||||
|
||||
Pass@32 (n=64) across five Lean 4 benchmarks. **Bold** is best, _underlined_
|
||||
is second-best.
|
||||
|
||||

|
||||
|
||||
OProver-32B reaches three best and two second-best across five benchmarks —
|
||||
the most top placements of any model in the comparison, despite being a
|
||||
32B dense model versus a 560B MoE or a 671B dense competitor.
|
||||
|
||||
## Loading
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
# Pick any of: OProver-8B, OProver-32B, *-Base, *-Round1, *-Round2
|
||||
name = "m-a-p/OProver-8B"
|
||||
tok = AutoTokenizer.from_pretrained(name)
|
||||
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="bfloat16", device_map="auto")
|
||||
```
|
||||
|
||||
```python
|
||||
from datasets import load_dataset
|
||||
ds = load_dataset("m-a-p/OProofs", split="train")
|
||||
```
|
||||
|
||||
OProver is trained against a multi-round agentic interface: at each round the
|
||||
input includes the target Lean statement, top-k retrieved verified proofs, the
|
||||
prior proof attempt, and the Lean compiler feedback. See the paper §2.1 for
|
||||
the prompt template, and Appendix B for serialization details.
|
||||
|
||||
## Citation
|
||||
|
||||
```bibtex
|
||||
@article{ma2026oprover,
|
||||
title = {OProver: A Unified Framework for Agentic Formal Theorem Proving},
|
||||
author = {David Ma and Kaijing Ma and Shawn Guo and Yunfeng Shi and Enduo Zhao and Jiajun Shi and Zhaoxiang Zhang and Gavin Cheung and Jiaheng Liu and Zili Wang},
|
||||
journal = {arXiv preprint arXiv:2605.17283},
|
||||
year = {2026}
|
||||
}
|
||||
```
|
||||
57
added_tokens.json
Normal file
57
added_tokens.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"</think>": 151668,
|
||||
"</tool_call>": 151658,
|
||||
"</tool_response>": 151666,
|
||||
"<dream>": 151682,
|
||||
"<dream_end>": 151684,
|
||||
"<dream_start>": 151683,
|
||||
"<im_end>": 151681,
|
||||
"<im_patch>": 151679,
|
||||
"<im_start>": 151680,
|
||||
"<patch_end>": 151690,
|
||||
"<patch_newline>": 151691,
|
||||
"<patch_start>": 151689,
|
||||
"<think>": 151667,
|
||||
"<tool_call>": 151657,
|
||||
"<tool_response>": 151665,
|
||||
"<video_end>": 151688,
|
||||
"<video_start>": 151687,
|
||||
"<|BOT|>": 151670,
|
||||
"<|CALL_END|>": 151672,
|
||||
"<|CALL_START|>": 151671,
|
||||
"<|EOT|>": 151669,
|
||||
"<|IMG_END|>": 151676,
|
||||
"<|IMG_START|>": 151675,
|
||||
"<|MASK_1e69f|>": 151685,
|
||||
"<|META_END|>": 151678,
|
||||
"<|META_START|>": 151677,
|
||||
"<|THINK_END|>": 151674,
|
||||
"<|THINK_START|>": 151673,
|
||||
"<|UNMASK_1e69f|>": 151686,
|
||||
"<|box_end|>": 151649,
|
||||
"<|box_start|>": 151648,
|
||||
"<|endoftext|>": 151643,
|
||||
"<|file_sep|>": 151664,
|
||||
"<|fim_middle|>": 151660,
|
||||
"<|fim_pad|>": 151662,
|
||||
"<|fim_prefix|>": 151659,
|
||||
"<|fim_suffix|>": 151661,
|
||||
"<|im_end|>": 151645,
|
||||
"<|im_start|>": 151644,
|
||||
"<|image_pad|>": 151655,
|
||||
"<|object_ref_end|>": 151647,
|
||||
"<|object_ref_start|>": 151646,
|
||||
"<|quad_end|>": 151651,
|
||||
"<|quad_start|>": 151650,
|
||||
"<|repo_name|>": 151663,
|
||||
"<|video_pad|>": 151656,
|
||||
"<|vision_end|>": 151653,
|
||||
"<|vision_pad|>": 151654,
|
||||
"<|vision_start|>": 151652,
|
||||
"<|begin▁of▁mask|>": 151693,
|
||||
"<|begin▁of▁sentence|>": 151692,
|
||||
"<|end▁of▁mask|>": 151694,
|
||||
"<|end▁of▁sentence|>": 151697,
|
||||
"<|fim▁begin|>": 151695,
|
||||
"<|fim▁hole|>": 151696
|
||||
}
|
||||
BIN
assets/main_results.png
Normal file
BIN
assets/main_results.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 KiB |
BIN
assets/oproofs.png
Normal file
BIN
assets/oproofs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 250 KiB |
31
config.json
Normal file
31
config.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"architectures": [
|
||||
"Qwen3ForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"eos_token_id": 151645,
|
||||
"head_dim": 128,
|
||||
"hidden_act": "silu",
|
||||
"hidden_dropout": 0.0,
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 12288,
|
||||
"max_position_embeddings": 40960,
|
||||
"max_window_layers": 36,
|
||||
"model_type": "qwen3",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 36,
|
||||
"num_key_value_heads": 8,
|
||||
"pad_token_id": 151643,
|
||||
"rms_norm_eps": 1e-06,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 1000000,
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.51.1",
|
||||
"use_cache": true,
|
||||
"use_sliding_window": false,
|
||||
"vocab_size": 151936
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "others", "allow_remote": true}
|
||||
3
data.pt
Normal file
3
data.pt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:58fca30df8df9ab82e2c1b2ddd41cb43d94bf5eee1d4b0c1bee81c3c7eb87408
|
||||
size 1492
|
||||
3
merges.txt
Normal file
3
merges.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
|
||||
size 1671853
|
||||
3
model-00001.safetensors
Normal file
3
model-00001.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d57ecc138f40fe109ad7a16568ad69e8a58897555e1be4f958e1445992998d4e
|
||||
size 4286778640
|
||||
3
model-00002.safetensors
Normal file
3
model-00002.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e17572fddf63e5360a1cc4c23832805bb91c43e2ea5cdf8a1f44a8ee915ccca
|
||||
size 4286779488
|
||||
3
model-00003.safetensors
Normal file
3
model-00003.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe2f381a3caa340c02343a7b416ec4d6c213472cdbfd9621da9ca8385812aff9
|
||||
size 4244835480
|
||||
3
model-00004.safetensors
Normal file
3
model-00004.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf9c64e80991005d124df02226beed0f8d2b05a2c5dbbe625f67c4b31fa28a80
|
||||
size 3563123040
|
||||
1
model.safetensors.index.json
Normal file
1
model.safetensors.index.json
Normal file
File diff suppressed because one or more lines are too long
47
special_tokens_map.json
Normal file
47
special_tokens_map.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|EOT|>",
|
||||
"<|BOT|>",
|
||||
"<|CALL_START|>",
|
||||
"<|CALL_END|>",
|
||||
"<|THINK_START|>",
|
||||
"<|THINK_END|>",
|
||||
"<|IMG_START|>",
|
||||
"<|IMG_END|>",
|
||||
"<|META_START|>",
|
||||
"<|META_END|>",
|
||||
"<im_patch>",
|
||||
"<im_start>",
|
||||
"<im_end>",
|
||||
"<dream>",
|
||||
"<dream_start>",
|
||||
"<dream_end>",
|
||||
"<|MASK_1e69f|>",
|
||||
"<|UNMASK_1e69f|>",
|
||||
"<video_start>",
|
||||
"<video_end>",
|
||||
"<patch_start>",
|
||||
"<patch_end>",
|
||||
"<patch_newline>",
|
||||
"<|begin▁of▁sentence|>",
|
||||
"<|begin▁of▁mask|>",
|
||||
"<|end▁of▁mask|>",
|
||||
"<|fim▁begin|>",
|
||||
"<|fim▁hole|>",
|
||||
"<|end▁of▁sentence|>"
|
||||
],
|
||||
"eos_token": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:217e7242c0cafb50790f703bb14e062966b997a1bc8dc980e11240f5f1d06d27
|
||||
size 11428198
|
||||
488
tokenizer_config.json
Normal file
488
tokenizer_config.json
Normal file
@@ -0,0 +1,488 @@
|
||||
{
|
||||
"add_bos_token": false,
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"151643": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151644": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151645": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151646": {
|
||||
"content": "<|object_ref_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151647": {
|
||||
"content": "<|object_ref_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151648": {
|
||||
"content": "<|box_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151649": {
|
||||
"content": "<|box_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151650": {
|
||||
"content": "<|quad_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151651": {
|
||||
"content": "<|quad_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151652": {
|
||||
"content": "<|vision_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151653": {
|
||||
"content": "<|vision_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151654": {
|
||||
"content": "<|vision_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151655": {
|
||||
"content": "<|image_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151656": {
|
||||
"content": "<|video_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151657": {
|
||||
"content": "<tool_call>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151658": {
|
||||
"content": "</tool_call>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151659": {
|
||||
"content": "<|fim_prefix|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151660": {
|
||||
"content": "<|fim_middle|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151661": {
|
||||
"content": "<|fim_suffix|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151662": {
|
||||
"content": "<|fim_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151663": {
|
||||
"content": "<|repo_name|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151664": {
|
||||
"content": "<|file_sep|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151665": {
|
||||
"content": "<tool_response>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151666": {
|
||||
"content": "</tool_response>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151667": {
|
||||
"content": "<think>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151668": {
|
||||
"content": "</think>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151669": {
|
||||
"content": "<|EOT|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151670": {
|
||||
"content": "<|BOT|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151671": {
|
||||
"content": "<|CALL_START|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151672": {
|
||||
"content": "<|CALL_END|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151673": {
|
||||
"content": "<|THINK_START|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151674": {
|
||||
"content": "<|THINK_END|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151675": {
|
||||
"content": "<|IMG_START|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151676": {
|
||||
"content": "<|IMG_END|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151677": {
|
||||
"content": "<|META_START|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151678": {
|
||||
"content": "<|META_END|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151679": {
|
||||
"content": "<im_patch>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151680": {
|
||||
"content": "<im_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151681": {
|
||||
"content": "<im_end>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151682": {
|
||||
"content": "<dream>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151683": {
|
||||
"content": "<dream_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151684": {
|
||||
"content": "<dream_end>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151685": {
|
||||
"content": "<|MASK_1e69f|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151686": {
|
||||
"content": "<|UNMASK_1e69f|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151687": {
|
||||
"content": "<video_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151688": {
|
||||
"content": "<video_end>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151689": {
|
||||
"content": "<patch_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151690": {
|
||||
"content": "<patch_end>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151691": {
|
||||
"content": "<patch_newline>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151692": {
|
||||
"content": "<|begin▁of▁sentence|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151693": {
|
||||
"content": "<|begin▁of▁mask|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151694": {
|
||||
"content": "<|end▁of▁mask|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151695": {
|
||||
"content": "<|fim▁begin|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151696": {
|
||||
"content": "<|fim▁hole|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151697": {
|
||||
"content": "<|end▁of▁sentence|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|EOT|>",
|
||||
"<|BOT|>",
|
||||
"<|CALL_START|>",
|
||||
"<|CALL_END|>",
|
||||
"<|THINK_START|>",
|
||||
"<|THINK_END|>",
|
||||
"<|IMG_START|>",
|
||||
"<|IMG_END|>",
|
||||
"<|META_START|>",
|
||||
"<|META_END|>",
|
||||
"<im_patch>",
|
||||
"<im_start>",
|
||||
"<im_end>",
|
||||
"<dream>",
|
||||
"<dream_start>",
|
||||
"<dream_end>",
|
||||
"<|MASK_1e69f|>",
|
||||
"<|UNMASK_1e69f|>",
|
||||
"<video_start>",
|
||||
"<video_end>",
|
||||
"<patch_start>",
|
||||
"<patch_end>",
|
||||
"<patch_newline>",
|
||||
"<|begin▁of▁sentence|>",
|
||||
"<|begin▁of▁mask|>",
|
||||
"<|end▁of▁mask|>",
|
||||
"<|fim▁begin|>",
|
||||
"<|fim▁hole|>",
|
||||
"<|end▁of▁sentence|>"
|
||||
],
|
||||
"bos_token": null,
|
||||
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|im_end|>",
|
||||
"errors": "replace",
|
||||
"extra_special_tokens": {},
|
||||
"model_max_length": 131072,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"split_special_tokens": false,
|
||||
"tokenizer_class": "Qwen2Tokenizer",
|
||||
"unk_token": null
|
||||
}
|
||||
BIN
vocab.json
(Stored with Git LFS)
Normal file
BIN
vocab.json
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user