--- license: apache-2.0 language: - en - zh library_name: transformers pipeline_tag: text-generation tags: - minicpm - minicpm5 - llama - text-generation - long-context - tool-calling - on-device - edge-ai datasets: - openbmb/Ultra-FineWeb - openbmb/UltraX-Preview - openbmb/Ultra-FineWeb-L3 - openbmb/UltraData-Math - openbmb/UltraData-Code - openbmb/UltraData-SFT-2605 - openbmb/UltraData-SFT-Agent-2609 - openbmb/UltraData-RL-2609 ---
MiniCPM Tech Report | MiniCPM Wiki(Chinese) | GitHub Repo | UltraData | Online Demo
English | 中文
# MiniCPM5-2B-DSpark `MiniCPM5-2B-DSpark` is a [DSpark](https://arxiv.org/abs/2607.05147) draft checkpoint trained for exact pairing with [MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) and its tokenizer. ## Model Specification | Property | Value | |---|---| | Target model | [MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) | | Draft layers | 5 | | Draft parameters | 323,776,001 | | Draft tokens per forward pass | 7 | | Target hidden-state layers | `[1, 10, 20, 30, 39]` | | Checkpoint precision | BF16 | ## Training Recipe Training responses were generated by [MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) from a mixture of general-domain, mathematics, and code prompts. | Setting | Value | |---|---| | Training sequences | 1,959,525 | | Training tokens | 7,054,154,509 | | Epochs | 6 | | Maximum sequence length | 12,288 | | Optimizer | AdamW | | Objective | CE + L1 + confidence loss | ## Evaluation Acceptance length is defined as the total number of completion tokens divided by the total number of speculative verification steps. Evaluation uses natural EOS termination and `max_new_tokens=4096`. | Domain | `T=0` | `T=1.0` | |---|---:|---:| | Math | 6.0496 | 4.6050 | | Code | 6.1106 | 4.4381 | | General | 4.1585 | 3.0997 | | Aggregate | **5.5174** | **4.0514** | ## Usage with SGLang ```bash python -m sglang.launch_server \ --model-path