/ Модель

Характеристики

Контекст
131 072 токена
Параметры
838 млн
Размер весов
2,2 ГБ
Лицензия
Apache 2.0
Архитектура
llama · dense
Библиотека
transformers
Опубликована
4 авг 2026

MiniCPM5-1B-heretic

Генерация текстаТекст → текст13 профессий

Компактная версия MiniCPM5-1B с ослабленной склонностью к отказам для локального диалога, генерации кода и рассуждений.

57скачиваний за 30 дней3лайкавеса обновлены5 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Dingdust/MiniCPM5-1B-heretic — текстовая генеративная модель на базе MiniCPM5-1B, изменённая методом abliteration для снижения склонности к отказам. В карточке приведено сравнение: доля отказов снизилась с 97 до 7 из 100, а KL-дивергенция относительно исходной модели составляет 0,0253. Модель сохраняет архитектуру LlamaForCausalLM и контекстное окно 131 072 токена; метаданные указывают 837,6 млн параметров и формат Safetensors.

Модель предназначена для локальных диалоговых ассистентов, генерации кода, рассуждений и сценариев с использованием инструментов. Исходная карточка MiniCPM5-1B описывает режимы быстрого ответа и пошагового рассуждения, однако метаданные этого репозитория подтверждают только генерацию текста и чат; отдельная проверка tool calling для данной версии не приведена. Языковые теги — английский и китайский. Репозиторий распространяется по лицензии Apache-2.0.

Снижение отказов может повысить вероятность ответа на запросы, на которые исходная модель отказалась бы отвечать, но не гарантирует точность или безопасность результата. Модель может выдавать неточную, предвзятую или небезопасную информацию; ответы следует проверять, особенно перед применением в ответственных сценариях.

Сценарии применения

  • локальный диалоговый ассистент на устройстве
  • генерация и дополнение кода
  • ответы на вопросы по длинному контексту
  • рассуждения в текстовых задачах
  • эксперименты с моделью с пониженной долей отказов

Ограничения

Снижение отказов может увеличить вероятность небезопасных ответов; выходы могут быть неточными или предвзятыми и требуют проверки. В README не приведены отдельные результаты оценки качества этой модификации по задачам.

Для каких профессий подходит13

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

This is a decensored version of a model, made using Heretic v1.4.0

Abliteration parameters

ParameterValue
direction_index13.39
attn.o_proj.max_weight1.43
attn.o_proj.max_weight_position14.17
attn.o_proj.min_weight0.17
attn.o_proj.min_weight_distance12.46
mlp.down_proj.max_weight0.96
mlp.down_proj.max_weight_position16.45
mlp.down_proj.min_weight0.19
mlp.down_proj.min_weight_distance13.07

Performance

MetricThis modelOriginal model (a model)
KL divergence0.02530 (by definition)
Refusals7/10097/100

Residual Geometry

LayerS(g,b)S(g*,b*)S(g,r)S(g*,r*)S(b,r)S(b*,r*)|g||g*||b||b*||r||r*|Silh
10.99990.99990.06320.02000.07990.03673.393.403.403.400.060.060.1263
20.99910.99910.12560.10150.16720.14295.075.085.105.100.220.210.1012
30.99880.99880.06040.04420.10910.09246.786.796.816.810.330.330.0922
40.99860.99860.01750.01070.07000.06299.959.969.979.970.520.520.0989
50.99780.99780.02500.01150.09140.077410.9811.0011.0311.030.730.730.0928
60.99470.99490.0024-0.00980.10510.090812.7812.8212.8512.871.321.290.1042
70.99050.99120.11100.10080.24670.231414.5414.6114.9114.942.061.980.1032
80.98840.98860.23130.22550.37640.369518.0218.0918.9218.972.952.930.1155
90.98450.98570.11240.11550.28480.281019.4819.5420.1920.223.563.430.1083
100.98480.98580.03920.03280.21240.200021.7621.8622.2522.303.873.740.1054
110.98030.98120.20960.20520.39840.388426.9727.1728.7528.875.805.690.1363
120.97160.97290.14540.14250.37540.367730.5330.8432.5932.827.797.670.1438
130.94700.94720.05940.05450.37690.371739.9440.2343.0443.2713.8513.890.2016
140.93270.93200.02110.01210.38020.373848.3948.8352.3152.6518.8719.090.2255
150.92120.9186-0.0249-0.03970.36610.358459.7860.3864.2364.6325.0025.560.2556
160.90360.89990.0119-0.00060.43910.435667.6168.2575.2575.8232.2333.060.2651
170.91220.90750.02740.01180.43460.430782.6283.4091.7092.4137.5938.820.2614
180.90170.8953-0.0577-0.07570.37970.376498.9499.91106.77107.5346.2548.040.2463
190.89710.8902-0.1233-0.14240.32780.3242116.61117.75122.49123.2154.5256.710.2418
200.90210.8949-0.1000-0.11680.33920.3388133.94134.90141.67142.3961.4563.990.2345
210.90770.9011-0.0848-0.09840.34110.3429146.60147.37155.39156.1265.4368.040.2152
220.92860.92370.0016-0.01320.37250.3709178.47179.22192.31192.9671.3573.930.2015
230.92430.9193-0.0371-0.04660.34700.3504207.93208.50221.55222.3784.5987.620.2027
240.92120.9162-0.0595-0.08090.33350.3252139.27140.32147.47147.9057.4859.460.1651

g = mean of residual vectors for good prompts

g* = geometric median of residual vectors for good prompts

b = mean of residual vectors for bad prompts

b* = geometric median of residual vectors for bad prompts

r = refusal direction for means (i.e., b - g)

r* = refusal direction for geometric medians (i.e., b* - g*)

S(x,y) = cosine similarity of x and y

|x| = L2 norm of x

Silh = Mean silhouette coefficient of residuals for good/bad clusters

Residual Vectors Visualization

MiniCPM5-1B-animation


Highlights

We are releasing MiniCPM5-1B, the first model in the MiniCPM5 series. It is a dense 1B Transformer built for on-device, local deployment, and resource-constrained scenarios, reaching 1B-class open-source SOTA.

🏆 1B-class open-source SOTA: compared with strong open-source models in the same size class, MiniCPM5-1B reaches SOTA within this comparison set. Its advantage is most visible in agentic tool use, code generation, and difficult reasoning.

MiniCPM5-1B capability comparison by domain

🧠 Hybrid Reasoning: built-in <think> chat template, switch via enable_thinking. The same checkpoint serves as both a fast assistant and a deliberate reasoner.

🛠️ Deployment / Fine-tuning Resources: the MiniCPM GitHub repo provides single-page cookbooks and Agent Skills for major inference backends and fine-tuning frameworks.

🐱 Desktop Pet: a local-LLM desktop pet driven by MiniCPM5-1B.

Model List

Use this directory to choose the model format that matches your runtime:

Model Information

MiniCPM5-1B has the following features:

  • Type: Causal Language Model
  • Architecture: Standard LlamaForCausalLM
  • Number of Parameters: 1,080,632,832
  • Number of Non-Embedding Parameters: 679,552,512
  • Number of Layers: 24
  • Number of Attention Heads (GQA): 16 for Q and 2 for KV
  • Context Length: 131,072

Introduction

MiniCPM5-1B is the first checkpoint in the MiniCPM5 series. It is designed for local assistants, coding agents, tool-use workflows, and reasoning scenarios where a compact model is preferred. The model keeps a small deployment footprint while providing native long-context support and both Think / No Think chat modes through the same checkpoint.

Evaluation Results

We compare MiniCPM5-1B with strong open-source models in the same size class, including LFM2.5-1.2B-Thinking, Qwen3-0.6B/think and Qwen3.5-0.8B/think. These are capable baselines; within this comparison set, MiniCPM5-1B reaches 1B-class open-source SOTA, with its advantage most visible in tool use, code generation, and difficult reasoning. This makes it a practical choice for local coding agents, tool assistants, and reasoning assistants.

MiniCPM-5 1B Public Leaderboard

Training Recipe

The training of MiniCPM5-1B is a full-stack practice of UltraData Tiered Data Management, covering three stages: base training, mid-training, and post-training.

During base training, the model goes through stable training and decay training to build core language capability and training stability. It then enters mid-training to further strengthen target capabilities and adapt to the target data distribution. The training corpus is released alongside the model as Ultra-FineWeb, Ultra-FineWeb-L3, and UltraData-Math.

During post-training, we proceed in three steps: SFT, RL, and OPD. We first use 200B tokens of deep-thinking SFT and 200B tokens of hybrid-thinking SFT to establish deep-thinking, hybrid-thinking, and general chat abilities; the SFT data is released as UltraData-SFT-2605. We then train specialized RL teachers for math, code, closed-book QA, writing, and related domains, and use On-Policy Distillation (OPD) to distill these teachers back into one release model.

MiniCPM5-1B Training Recipe

What does RL + OPD bring?

RL + OPD is a key part of MiniCPM5-1B post-training. On math, code and instruction-following tasks, RL + OPD raises the average score by ↑16 points while cutting the share of responses that hit the max-tokens budget by ↓29 percentage points. The figures below show the two-stage Reasoning RL pipeline, score gains, and the drop in overlong responses.

RL combines complementary training signals for reasoning, closed-book QA, writing, instruction following, long-context understanding, and general dialogue. Reasoning RL is based on DAPO-Math-17k (inspired by JustRL's minimalist recipe) and uses a two-stage length schedule to reduce overlong responses while improving reasoning accuracy. We also use TriviaQA, NQ-Open, LongWriter-Zero-RLData, synthesized verifiable RLVR data, and pair-wise RLHF signals to improve reliability, instruction following, and user experience.

MiniCPM5-1B RL Two-stage Pipeline

OPD builds on Thinking Machines Lab's On-Policy Distillation and incorporates implementation improvements from Rethinking On-Policy Distillation. In the RL framework, we use reverse KL divergence as the advantage estimate, replacing the original verification-based advantage. At each response position, we take top-k logits from both the student and teacher models, compute reverse KL on the union of the two token sets, and balance the accuracy of the RKL signal with training efficiency. OPD reuses the in-domain prompts used to train each RL teacher as distillation data, so no additional data curation is required.

MiniCPM5-1B RL + OPD Gains

MiniCPM5-1B RL + OPD Overlong Response Rate Drop

Quickstart

vLLM

pip install "vllm>=0.21"
vllm serve openbmb/MiniCPM5-1B --port 8000
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openbmb/MiniCPM5-1B",
    "messages": [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}],
    "max_tokens": 128,
    "temperature": 0.7
  }'

SGLang

pip install "sglang[srt]>=0.5.12"
python -m sglang.launch_server --model-path openbmb/MiniCPM5-1B --port 30000
curl http://localhost:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openbmb/MiniCPM5-1B",
    "messages": [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}],
    "max_tokens": 128,
    "temperature": 0.7
  }'

Transformers

pip install -U "transformers>=5.6" accelerate torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "openbmb/MiniCPM5-1B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

messages = [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}]
inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    enable_thinking=False,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Recommended chat template sampling:

ModeRecommended paramsEnable
Thinktemperature=0.9, top_p=0.95enable_thinking=True
No Thinktemperature=0.7, top_p=0.95enable_thinking=False

Tool Calling

For tool / function calling, SGLang is the recommended backend. MiniCPM5-1B emits XML-style tool calls and SGLang's built-in minicpm5 parser converts them to OpenAI-compatible tool_calls natively:

python -m sglang.launch_server --model-path openbmb/MiniCPM5-1B --port 30000 \
    --tool-call-parser minicpm5      # or: --tool-call-parser auto

GitHub Cookbooks and Agent Skills

MiniCPM5-1B uses the standard LlamaForCausalLM architecture, so mainstream inference engines can load it directly: no custom kernels, no model-code fork. For step-by-step deployment and fine-tuning instructions, use the GitHub cookbooks below. Agent Skills are linked as GitHub resources for users working with Cursor / Claude Code style coding agents.

Deployment

BackendModel format / use caseCookbookAgent Skill
TransformersBF16 / FP16 local Python inference, GPU + CPUtransformers.mdminicpm5-deploy-transformers
vLLMBF16 / FP16 OpenAI servervllm.mdminicpm5-deploy-vllm
SGLangBF16 / FP16 OpenAI server, recommended for tool callingsglang.mdminicpm5-deploy-sglang
llama.cppGGUF local inference, CPU/GPUllama_cpp.mdminicpm5-deploy-llama-cpp
OllamaGGUF local on-device runtimeollama.mdminicpm5-deploy-ollama
LM StudioGGUF Mac desktop app and OpenAI serverlmstudio.mdminicpm5-deploy-lmstudio
MLXMLX / 4bit local inference on Apple Siliconmlx.mdminicpm5-deploy-mlx
ArcLightGGUF local on-device, CPU, Desktop & Serverarclight.mdminicpm5-deploy-arclight

Fine-tuning

FrameworkUse caseCookbookAgent Skill
TRL + PEFTLoRA / SFT fine-tuningtrl.mdminicpm5-finetune-trl
LLaMA-FactoryFine-tuningllamafactory.mdminicpm5-finetune-llamafactory
ms-swiftFine-tuningms_swift.mdminicpm5-finetune-ms-swift
unslothFine-tuningunsloth.mdminicpm5-finetune-unsloth
xtunerFine-tuningxtuner.mdminicpm5-finetune-xtuner

Other Supported Frameworks

In addition to the deployment and fine-tuning frameworks listed above, MiniCPM5-1B is also supported by FlagOS for multi-chip deployment.

FlagOS Overview

To enable large-scale deployment across different AI chips, Beijing Zhiyuan Research Institute, together with numerous research institutions, chip manufacturers, system vendors, and algorithm and software organizations both domestically and internationally, jointly initiated and established the FlagOS Open Source Community.

The FlagOS community is dedicated to building a unified, open-source system software stack for various AI chips, encompassing core open-source projects such as a large-scale operator library, a unified AI compiler, parallel training and inference frameworks, and a unified communication library. It aims to create an open technology ecosystem connecting the “model-system-chip” layers. By enabling “develop once, deploy across chips”, FlagOS unlocks the computational potential of hardware, breaks down the ecosystem silos between different chip software stacks, and effectively reduces migration costs for developers.The FlagOS community fosters an AI hardware and software ecosystem, overcomes single-vendor closed-source monopolies, promotes widespread deployment of AI hardware technologies, and is committed to rooted in China while embracing global collaboration.

Official website express: https://flagos.io

FlagOS: Supporting Multiple AI Chips

Thanks to FlagOS’s unified multi-chip AI system software stack, MiniCPM5-1B was adapted to 4–5 different AI chips in an extremely short time. Currently, the multi-chip version of MiniCPM5-1B has been released on FlagRelease, FlagOS’s platform for automatic migration, adaptation, and deployment of large models across multi-architecture AI chips. Details are as follows:

VendorModelScopeHuggingface
NvidiaMiniCPM5-1B-nvidia-FlagOSMiniCPM5-1B-nvidia-FlagOS
HygonMiniCPM5-1B-hygon-FlagOSMiniCPM5-1B-hygon-FlagOS
MetaxMiniCPM5-1B-metax-FlagOSMiniCPM5-1B-metax-FlagOS
IluvatarMiniCPM5-1B-iluvatar-FlagOSMiniCPM5-1B-iluvatar-FlagOS
ZhenwuMiniCPM5-1B-zhenwu-FlagOSMiniCPM5-1B-zhenwu-FlagOS
MthreadsMiniCPM5-1B-mthreads-FlagOSMiniCPM5-1B-mthreads-FlagOS
KunlunxinMiniCPM5-1B-kunlunxin-FlagOSMiniCPM5-1B-kunlunxin-FlagOS
AscendMiniCPM5-1B-ascend-FlagOSMiniCPM5-1B-ascend-FlagOS
ARM-v9MiniCPM5-1B-Armv9-FlagOSMiniCPM5-1B-Armv9-FlagOS

FlagOS Usage

FlagOS Performance Acceleration on Nvidia
From FlagRelease (Recommendation)

FlagRelease is a platform developed by the FlagOS team for automatic migration, adaptation, and deployment of large models across multi-architecture AI chips. The multi-chip version of MiniCPM5-1B has already been released on FlagRelease. All necessary software packages are pre-installed on the platform, so users do not need to install anything.

FlagRelease Image Key Versions
FlagRelease Quick Start
VendorModelScopeHuggingface
NvidiaMiniCPM5-1B-nvidia-FlagOSMiniCPM5-1B-nvidia-FlagOS
HygonMiniCPM5-1B-hygon-FlagOSMiniCPM5-1B-hygon-FlagOS
MetaxMiniCPM5-1B-metax-FlagOSMiniCPM5-1B-metax-FlagOS
IluvatarMiniCPM5-1B-iluvatar-FlagOSMiniCPM5-1B-iluvatar-FlagOS
ZhenwuMiniCPM5-1B-zhenwu-FlagOSMiniCPM5-1B-zhenwu-FlagOS
MthreadsMiniCPM5-1B-mthreads-FlagOSMiniCPM5-1B-mthreads-FlagOS
KunlunxinMiniCPM5-1B-kunlunxin-FlagOSMiniCPM5-1B-kunlunxin-FlagOS
AscendMiniCPM5-1B-ascend-FlagOSMiniCPM5-1B-ascend-FlagOS
ARM-v9MiniCPM5-1B-Armv9-FlagOSMiniCPM5-1B-Armv9-FlagOS
From Scratch
  • Dependencies: Python 3.12, GLIBC 2.39, GLIBCXX 3.4.33, CXXABI 1.3.15
Vllm Version
Installing the FlagOS Operator Library

Official Repository: https://github.com/flagos-ai/FlagGems

pip install flag-gems==4.2.1rc0
pip install triton==3.5.1
Activating Acceleration

You can enable flagGems acceleration by adding the import of flagGems in the source code of vllm where inference is performed.

import flag_gems
flag_gems.enable(record=True, once=True, path="/root/gems.txt")
vllm serve ${model_path} \
--trust-remote-code \
--dtype bfloat16 \
--enforce-eager \
--port ${Port} \
--served-model-name ${model_name} \
--gpu-memory-utilization 0.85
Using FlagOS Unified Multi-Chip Backend Plugin

vllm-plugin-FL is a plugin built for the vLLM inference/service framework. Developed on top of FlagOS’s unified multi-chip backend, it is designed to extend vLLM’s capabilities and performance across a variety of hardware environments.

Using vllm-plugin-FL
VendorFrom ScratchFrom FlagRelease
Nvidiavllm-plugin-FL/MiniCPM5-1BMiniCPM5-1B-ModelScopeMiniCPM5-1B-nvidia-FlagOS

Desktop Pet

We also ship OpenBMB/MiniCPM-Desk-Pet, a desktop pet driven locally by MiniCPM5-1B. It supports Apple Silicon / NVIDIA GPU / CPU paths, can work with coding agents such as Cursor, Claude Code, and Codex, and supports LoRA persona switching.

Limitations and Responsible Use

MiniCPM5-1B is a language model that generates content based on learned statistical patterns from training data. It may produce inaccurate, biased, or unsafe outputs, and generated content should be reviewed and verified before use in high-stakes settings.

Users are responsible for evaluating outputs, applying appropriate safeguards, and complying with applicable laws, regulations, and platform policies.

License

This repository and MiniCPM model weights are released under the Apache-2.0 License.

Citation

Please cite our paper if you find our work valuable:

@article{minicpm4,
  title={Minicpm4: Ultra-efficient llms on end devices},
  author={MiniCPM, Team},
  journal={arXiv preprint arXiv:2506.07900},
  year={2025}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
40d8c50

0 моделей