alt.freeweights.minicpm / MiniCPM-S-1B-sft
From: openbmb <huggingface.co/openbmb>Newsgroups: alt.freeweights.minicpmSubject:

MiniCPM-S-1B-sft

Date: 2026-11-15Commit: e46afa6Signed: 2DC28CC7B26A283B ✓

Text generation model with 1.4B parameters. Safetensors weights, 5.45 GB in all. Published by openbmb under Apache-2.0.

1.4B params5.45GBMiniCPM-S-1B-sftsafetensorspermissive
FactsParams1.4BSize5.45 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get openbmb/MiniCPM-S-1B-sft
# manifest sha256 7e93a2a4ca51… · 5.45 GB · 12 files
$ fw verify ./MiniCPM-S-1B-sft openbmb/MiniCPM-S-1B-sft
From sourceHosted (signed)openbmb/MiniCPM-S-1B-sftLast check: 2026-11-15 03:46 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
5.45 GB
Weights
2.72 GB (safetensors)
Parameters
1.4B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
openbmb
Added
2026-11-15
Section
alt.freeweights.minicpm
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:46 UTCpassed

Model card

From the publisher at commit e46afa6. Shown as plain text with links; images open at the publisher.

MiniCPM-S-1B-sft#

Chat Template#

To make the model sophisticatedly respond to a query, it is recommended to use a standard chat prompt, such as:

<用户>{prompt}<AI>

where prompt is the query text, while <用户> and <AI> are prompt tokens.

Also, make sure that you have a bos token <s> at the beginning of any input, or the model can sometimes behave improperly.

Introduction#

The utilization of activation sparsity, namely the existence of considerable weakly-contributed elements among activation outputs, is a promising method for inference acceleration of large language models (LLMs) (Liu et al., 2023; Song et al., 2023). Concretely, acceleration methods based on activation sparsity usually achieve higher inference speed by making wiser resource allocation and computation policies to avoid resource waste on these weakly-contributed parameters.

Adopting ReLU as the activation function is a straightforward method to achieve activation sparsity. However, most recent mainstream LLMs adopt activation functions without intrinsic sparsity (e.g., GELU and Swish). Some efforts (Zhang et al., 2022; Mirzadeh et al., 2023; Zhang et al., 2024) introduce ReLU or its variants as the substitutive activation function to help non-ReLU LLMs achieve activation sparsity and inference acceleration, but few can concurrently obtain high sparsity and comparable task-specific performance.

In this work, we introduce a simple and effective sparsification method named "ProSparse" to push LLMs for higher activation sparsity while maintaining comparable performance. By applying ProSparse to Swish-activated LLaMA2-7B, LLaMA2-13B, and MiniCPM-1B, we obtain ReLU-activated models with high sparsity of 89.32%, 88.80%, and 87.89%, respectively, while their performance is comparable to the original version. These present the most sparsely activated models among open-source LLaMA versions and competitive end-size models, considerably surpassing ReluLLaMA-7B (66.98%) and ReluLLaMA-13B (71.56%). Further inference acceleration experiments demonstrate the practical speedup effects of higher sparsity on both PowerInfer and our two sparse GPU operators.

Training Dataset#

We train the 1B model on about 473.02 billion tokens within 101,000 steps. These consist of 35,000 steps for standard ProSparse pre-training, 60,000 steps for decay, and 6,000 steps for SFT. Except for ProSparse, other training settings are highly consistent with the original MiniCPM-1B. Refer to our paper and MiniCPM technical report for more details.

Intuitively, training the model with even more tokens or with data of a wider coverage and higher quality will obtain better task-specific performance.

ProSparse: Training Methodology#

The training process of ProSparse consists of three steps (refer to Section 3.2 of paper for more details):

  1. Activation Function Substitution: We substitute the activation function of FFNs with ReLU and apply continual training;
  2. Progressive Sparsity Regularization: We jointly optimize the model on the conventional next-token prediction loss and \\(L_1\\) regularization loss. The regularization is applied to the sparse intermediate outputs of FFNs with a regularization factor increasing progressively in multiple stages. Specifically, the regularization factor \\(\lambda\\) is set to a small constant for the warmup stage, and then increases along a smooth sine curve for each of the subsequent incremental stages. Each stage is accompanied by certain steps of training. In this way, the model can have more time to adapt to the increasing regularization without radical activation shifts, thus alleviating performance degradation.
  3. Activation Threshold Shifting: We finally replace ReLU with FATReLU (Kurtz et al., 2020), a ReLU variant with a positive threshold. This can prune those non-zero weakly-contributed elements in activation outputs and further boost sparsity.

The hyper-parameters for each stage (including the regularization factor \\(\lambda_i\\), the accumulated training steps \\(T_i\\), and the accumulated training tokens) are shown as follows:

Step Number \\(i\\)\\(\lambda_i\\)\\(T_i\\)Accumulated Tokens (B)
0010,00049.15
1\\(1e-3\\)15,00073.73
2\\(5e-3\\)20,00098.30
3\\(5e-3\\)25,000122.88
4\\(5e-2\\)35,000172.03
decay\\(5e-2\\) (fixed)95,000466.94
SFT\\(1e-2\\) (fixed)101,000473.02
Evaluation Results#

The evaluation results on the above benchmarks demonstrate the advantage of ProSparse, which is the only method achieving high sparsity and comparable performance to the original Swish-activated LLaMA2. Note that models under all settings are trained with the same number of tokens on the same mixed dataset. Our evaluation is based on the framework UltraEval. The evaluation details are listed as follows:

  • Code Generation: We compute the average pass@1 scores on HumanEval (0-shot) and MBPP (3-shot).
  • Commonsense Reasoning: We report the average 0-shot accuracies on PIQA, SIQA, HellaSwag, WinoGrande, and COPA.
  • Reading Comprehension: We compute the average 0-shot accuracies on BoolQ, LAMBADA, and TyDi QA.
  • Other Popular Benchmarks: We report the average accuracies on GSM8K (8-shot), MMLU (5-shot), Big Bench Hard (BBH) (3-shot), and AGI-Eval (0-shot).

Notes: For PIQA, SIQA, HellaSwag, WinoGrande, COPA, BoolQ, LAMBADA, TyDi QA, and AGI-Eval, we obtain the predicted answers based on maximized perplexity. For GSM8K, MMLU, and BBH, the predicted answers are directly generated.

| Setting | Average Sparsity | Average Performance | Code Generation | Commonsense Reasoning | Reading Comprehension | GSM8K | MMLU | BBH | AGI Eval |

| :-------------------: | :----------------: | :----------------------: | :----------------------: | :---: | :---: | :---: | :---------: | :-----: | :-----------------: |

| LLaMA2-7B | - | 37.96 | 16.37 | 69.59 | 61.87 | 12.96 | 44.45 | 32.96 | 27.53 |

| ReluLLaMA-7B | 66.98 | 37.62 | 15.85 | 69.64 | 70.54 | 5.84 | 38.64 | 35.07 | 27.73 |

| ProSparse-7B\* | 88.11 | 38.31 | 19.47 | 66.29 | 63.33 | 12.74 | 45.21 | 33.59 | 27.55 |

| ProSparse-7B | 89.32 | 38.46 | 19.42 | 66.27 | 63.50 | 12.13 | 45.48 | 34.99 | 27.46 |

| LLaMA2-13B | - | 44.06 | 20.19 | 72.58 | 71.55 | 22.21 | 54.69 | 37.89 | 29.33 |

| ReluLLaMA-13B | 71.56 | 42.74 | 20.19 | 70.44 | 73.29 | 18.50 | 50.58 | 37.97 | 28.22 |

| ProSparse-13B\* | 87.97 | 45.07 | 29.03 | 69.75 | 67.54 | 25.40 | 54.78 | 40.20 | 28.76 |

| ProSparse-13B | 88.80 | 44.90 | 28.42 | 69.76 | 66.91 | 26.31 | 54.35 | 39.90 | 28.67 |

| MiniCPM-1B | - | 44.44 | 36.85 | 63.67 | 60.90 | 35.48 | 50.44 | 35.03 | 28.71 |

| MiniCPM-S-1B\* | 86.25 | 44.72 | 41.38 | 64.55 | 60.69 | 34.72 | 49.36 | 34.04 | 28.27 |

| MiniCPM-S-1B | 87.89 | 44.72 | 42.04 | 64.37 | 60.73 | 34.57 | 49.51 | 34.08 | 27.77 |

Notes: "Original" refers to the original Swish-activated LLaMA2 versions. ReluLLaMA-7B and ReluLLaMA-13B are available at 7B and 13B respectively. MiniCPM-1B is available at 1B. "ProSparse-7B\", "ProSparse-13B\", and "MiniCPM-S-1B\*" denote the ProSparse versions without activation threshold shifting.

Evaluation Issues with LM-Eval#

The above results can be replicated with UltraEval. Some abnormal results obtained with other popular frameworks such as LM-Eval are probably attributed to the absence of the cls token <s>, which is not added by default in LM-Eval. A quick temporary fix is shown in the following codes. Other differences in evaluation results may be caused by other reasons, including the few-shot settings, data pre-processing, and extra prompts.

# https://github.com/EleutherAI/lm-evaluation-harness/blob/main/lm_eval/models/huggingface.py#L945
for _, context_enc, continuation_enc in chunk:
    # sanity check
    assert len(context_enc) > 0
    # Note: a trivial fix here
    if context_enc[0] != 1:
        context_enc = [1] + context_enc
    assert len(continuation_enc) > 0
    assert len(continuation_enc) <= self.max_length

Here are the steps to adapting the original vLLM to ProSparse LLaMA models.

  1. Replace the file vllm/model_executor/models/llama.py in original vLLM with this file.
  2. Replace the contents of the original config.json with this file.
  3. Set the environment variable ACT_INFO. To test the version without activation threshold shifting, export ACT_INFO=relu. To test the version with activation threshold shifting, export ACT_INFO=fatrelu_0.01.
Inference Acceleration Effects#

First, we utilize PowerInfer, a state-of-the-art acceleration framework leveraging activation sparsity. As its inference speed and accuracy heavily rely on the performance of activation predictors, we report the activation recall and predicted sparsity (i.e., two key metrics for evaluating the activation predictor) as well as the number of tokens generated per second by PowerInfer (with one A100 GPU and sufficient CPUs). The GGUF files and activation predictors are also available for ProSparse LLaMA models.

Moreover, considering the potential inference inaccuracies caused by wrong predictions of activation predictors, we implement two sparse GPU operators for faster accurate inference utilizing activation sparsity. They are responsible for the speedup of two key steps in a gated FFN:

  • Step (2) (S2): a fused operator of ReLU and \\(\mathbf{s} \odot (\mathbf{x} \mathbf{W}_1^T)\\);
  • Step (3) (S3): a sparse matrix-vector multiplication operator \\(\mathbf{x}_1 \mathbf{W}_2^T\\).

where \\(\mathbf{s}\\), \\(\mathbf{x}\\), \\(\mathbf{x}_1\\), and \\(\odot\\) denote the gating scores, the FFN input hidden states, the intermediate outputs, and the element-wise multiplication respectively. \\(\mathbf{W}_1\\) and \\(\mathbf{W}_2\\) are FFN weight matrices.

The acceleration effects of LLMs with different sparsity are displayed as follows. ProSparse, which reaches a high sparsity without performance degradation, can gain the most benefits among all the settings concerned. Refer to Section 4.3 of paper for more details.

| Setting | Average Sparsity | Activation Recall | Predicted Sparsity | PowerInfer Speed | Speedup to Dense | S2 Time | Speedup to Dense | S3 Time | Speedup to Dense |

| :-------------------: | :-----------------: | :------------------: | :-------------------: | :-----------------: | :-----------------: | :--------------: | :-----------------: | :---------------: | :------------------: |

| Dense-7B | - | - | - | 3.67 | 1.00 | 90.55 | 1.00 | 82.92 | 1.00 |

| ReluLLaMA-7B | 66.98 | 90.89 | 58.95 | 11.37 | 3.10 | 67.12 | 1.35 | 63.00 | 1.32 |

| ProSparse-7B\* | 88.11 | 93.46 | 75.24 | 16.30 | 4.44 | 46.66 | 1.94 | 55.56 | 1.49 |

| ProSparse-7B | 89.32 | 92.34 | 78.75 | - | - | 45.38 | 2.00 | 55.05 | 1.51 |

| Dense-13B | - | - | - | 1.92 | 1.00 | 131.36 | 1.00 | 113.68 | 1.00 |

| ReluLLaMA-13B | 71.56 | 86.41 | 71.93 | 6.59 | 3.43 | 69.92 | 1.88 | 75.47 | 1.51 |

| ProSparse-13B\* | 87.97 | 91.02 | 77.93 | 8.67 | 4.52 | 55.29 | 2.38 | 67.50 | 1.68 |

| ProSparse-13B | 88.80 | 91.11 | 78.28 | - | - | 53.78 | 2.44 | 66.73 | 1.70 |

Notes: For "Dense" settings, the "Inference Speed" (token/sec) is obtained by llama.cpp, and the time (us) for steps (2) and (3) is measured without sparse GPU operators. For other sparse settings, the "Inference Speed" is obtained by PowerInfer, and sparse GPU operators are applied. ProSparse settings with activation threshold shifting and the MiniCPM architecture are not supported by PowerInfer at present.

Citation#

Please kindly cite using the following BibTeX:

@article{song2024prosparse,
  title={{ProSparse}: Introducing and Enhancing Intrinsic Activation Sparsity within Large Language Models},
  author={Song, Chenyang and Han, Xu and Zhang, Zhengyan and Hu, Shengding and Shi, Xiyu and Li, Kuai and Chen, Chen and Liu, Zhiyuan and Li, Guangli and Yang, Tao and Sun, Maosong},
  year={2024},
  journal={arXiv preprint arXiv:2402.13516},
  url={https://arxiv.org/pdf/2402.13516.pdf}
}
License#

This repository is released under the Apache-2.0 License.

The usage of MiniCPM model weights must strictly follow the General Model License (GML).

The models and weights of MiniCPM are completely free for academic research.

If you intend to utilize the model for commercial purposes, please reach out to cpm@modelbest.cn to obtain the certificate of authorization.

Statement#

As a language model, MiniCPM generates content by learning from a vast amount of text.

However, it does not possess the ability to comprehend or express personal opinions or value judgments.

Any content generated by MiniCPM does not represent the viewpoints or positions of the model developers.

Therefore, when using content generated by MiniCPM, users should take full responsibility for evaluating and verifying it on their own.

Acknowledgments#

The model card is modified from ReluLLaMA-7B and MiniCPM-1B.

A duplicate of this repo: link.

Files

12 files · 5.45 GBWeights 2.72 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md16.9 KB25a8aa094fde64c14643e3800091370402344336f7c66eab63bf9abdcf823650
config.json1.06 KBf9569b79714c3ba485dced3a3e49107b867cc2fdfd3d2fba8b9e08f84460437e
configuration_minicpm.py9.97 KBce797c9c8f2daa1b75c137f19b0613a1a7a3a7933aa80548a610e47d2923c63b
generation_config.json113 Ba022aa21060c3e0106edf2c9580e5d1878fa3ab01ad1fbe69a277cc847169e20
model.safetensors2.72 GBe7a69516a8c0ff1da01d93d151670ef70b990806858abc0117b1b9826eec612f
modeling_minicpm.py68.5 KB3f0e0088003f6d52c5c1dfbe90e75df6b37c13d9fb125f7f203f74d24c4b273d
pytorch_model.bin2.72 GB6dd932a34bea7eb041f248d38ef10b21c66fba6ee7689ec5049eb490606b7fd8
special_tokens_map.json414 B6fa06efa2785e450051989a6f8fb4416b10149ded485ddd3f127a40734f5cfd0
tokenizer.json3.68 MB308fb207d85fca5b64b3f17c80daba1700a11651c0a2632cadaedb5f10fa3558
tokenizer.model1.18 MBbb74d51116831c3bf65db812c553f94ab0c88dcf97a5bbb37e3504f6d359c530
tokenizer_config.json1.12 KB9c87efade54e9b26d3374a42f294d266722cbf9e97c748a12183d8317da074c9
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
e46afa6f3d pinned now2026-11-15 03:46 UTC12 files · 5.45 GB

Use it

$ fw get openbmb/MiniCPM-S-1B-sft
# manifest sha256 7e93a2a4ca51… · 5.45 GB · 12 files
$ fw verify ./MiniCPM-S-1B-sft openbmb/MiniCPM-S-1B-sft
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/openbmb/MiniCPM-S-1B-sft.json --dir ./MiniCPM-S-1B-sft $ python3 fw.py verify ./MiniCPM-S-1B-sft ./openbmb__MiniCPM-S-1B-sft.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openbmb/MiniCPM-S-1B-sft --revision e46afa6f3d196527ab75e869184e27c833e8effb --local-dir ./MiniCPM-S-1B-sft
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("openbmb/MiniCPM-S-1B-sft", revision="e46afa6f3d196527ab75e869184e27c833e8effb") model = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM-S-1B-sft", revision="e46afa6f3d196527ab75e869184e27c833e8effb", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve openbmb/MiniCPM-S-1B-sft --revision e46afa6f3d196527ab75e869184e27c833e8effb

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
25a8aa094fde64c14643e3800091370402344336f7c66eab63bf9abdcf823650
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: openbmb <huggingface.co/openbmb>Newsgroups: alt.freeweights.minicpmSubject: MiniCPM-S-1B-sftDate: 2026-11-15Commit: e46afa6Signed: 2DC28CC7B26A283B ✓
Upstream
openbmb/MiniCPM-S-1B-sft
Pinned commit
e46afa6f3d196527ab75e869184e27c833e8effb
Manifest
MiniCPM-S-1B-sft.json · .minisig
Manifest sha256
7e93a2a4ca519bf58c495a2e840274e04e9a1f3e4baa1637f5c08214e305a81d
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:46 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/openbmb/MiniCPM-S-1B-sft.json $ curl -O https://freeweights.allternit.com/manifests/openbmb/MiniCPM-S-1B-sft.json.minisig $ minisign -Vm MiniCPM-S-1B-sft.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openbmb/MiniCPM-S-1B-sft
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. MiniCPM-S-1B-sft.json. Provenance. Takedown history: none.
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Explore-GGUF
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Report
From: openbmb <huggingface.co/openbmb>Subject: AgentCPM-Report-GGUF
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-0.5B-gguf
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-1B-gguf
From: openbmb <huggingface.co/openbmb>Subject: BitCPM-CANN-3B-gguf