/ Модель

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

Контекст
131 072 токена
Параметры
2,2 млрд
Лицензия
Apache 2.0
Архитектура
llama · dense
Базовая модель
MiniCPM5-2B
Библиотека
transformers
Опубликована
16 сен 2026

MiniCPM5-2B-RotSVDMix-Quantized

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

MiniCPM5-2B-RotSVDMix — это сжатая и квантизованная версия языковой модели openbmb/MiniCPM5-2B, опубликованная ewin-reg.

1 835скачиваний за 30 дней2лайкавеса обновлены24 сен 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Модель содержит около 2 миллиардов параметров и основана на 42 слоях трансформера. Благодаря сочетанию ортогонального вращения, низкорангового SVD и квантизации ExTernD она занимает 1 985 213 632 байта, то есть менее 2 ГБ. Заявлена совместимость с PyTorch, Hugging Face Transformers, vLLM и TGI без необходимости компиляции специализированного C++-рантайма. Длина контекста в README не указана.

На тестовой выборке WikiText-2 модель показала perplexity 20,92 против 20,46 у базовой FP16-версии, что соответствует ухудшению примерно на 2,25%. Косинусное сходство логитов с базовой моделью составило 98,70%, совпадение наиболее вероятного токена — 96%, а пересечение пяти наиболее вероятных токенов — 100% на ограниченном наборе из 25 промптов. Эти результаты указывают на хорошее сохранение поведения исходной модели при существенном уменьшении размера, однако качество может зависеть от задачи, языка и входных данных; заявленные измерения не заменяют полноценную оценку прикладных сценариев.

Модель распространяется по лицензии Apache 2.0.

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

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

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

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

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

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

Открыть на Hugging Face

MiniCPM5-2B-RotSVDMix (v14 ExTernD stacked)

License: Apache 2.0 Base Model Format: SafeTensors WikiText-2 PPL Logit Cosine Model Size HF Downloads arXiv: ExTernD arXiv: Tequila arXiv: Sherry arXiv: QuaRot

What is this model?

MiniCPM5-2B-RotSVDMix is a compressed build of openbmb/MiniCPM5-2B designed to fit under a strict 2.00 GB storage ceiling.

The uncompressed base model weighs 4.69 GB, which is too large for 2 GB memory tiers, mobile application bundles, and free-tier GPU instances. Standard 4-bit quantization reduces file size, but causes compounding accuracy loss across MiniCPM's 42 transformer layers. High-precision 6-bit quantization preserves quality, but its 2.11 GB file size exceeds 2.00 GB limits.

This release hits the balance point:

  • File size: Exactly 1,985,213,632 bytes (displays as 1.98 GB on Hugging Face, leaving 14.79 MB of safety headroom below 2.000 GB).
  • Quality: 20.92 WikiText-2 perplexity, which is only +2.25% above the 20.46 FP16 baseline.
  • Logit alignment: 98.70% cosine similarity and 96.0% greedy token match against the unquantized model.
  • Compatibility: Shipped as a standard model.safetensors file. It runs directly in PyTorch, Hugging Face Transformers, vLLM, and TGI without requiring custom C++ runtime compilations.

Quickstart: run inference in Python

You can load and run text generation directly with Hugging Face Transformers:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "openbmb/MiniCPM5-2B"
weights_repo = "ewin-reg/MiniCPM5-2B-RotSVDMix"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    weights_repo,
    torch_dtype=torch.float16,
    device_map="auto",
    trust_remote_code=True
)

prompt = "Explain why small language models are useful for edge computing:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=128,
        temperature=0.7,
        top_p=0.95,
        do_sample=True
    )

print(tokenizer.decode(output_ids[0], skip_special_tokens=True))

Measured benchmarks

All numbers below are physical, verified measurements collected on an NVIDIA Tesla T4 GPU (14.56 GB VRAM) using CUDA 12.x across 10,240 tokens (20 chunks of 512 context) on WikiText-2.

Storage and memory comparison

Model variantFormatFile size (decimal)File size (bytes)Under 2.00 GB limit?HeadroomRuntime engine
OpenBMB Base FP16SafeTensors4.69 GB4,691,456,000 BNo (+2.69 GB over)NonePyTorch / vLLM / HF
GGUF Q4_K_MGGUF1.62 GB1,615,826,144 BYes+384.17 MBllama.cpp / Ollama
GGUF Q6_KGGUF2.11 GB2,107,305,184 BNo (+107 MB over)-107.31 MBllama.cpp / Ollama
Rot-SVD-Mix v14 (Ours)SafeTensors1.98 GB1,985,213,632 BYes+14.79 MBNative PyTorch / vLLM / HF

Empirical perplexity and quality metrics

All models evaluated on NVIDIA Tesla T4 GPU against their own native unquantized runtime baselines (PyTorch models vs PyTorch Base FP16; GGUF models vs Base GGUF BF16) across 10,240 tokens on WikiText-2 and 25 diverse benchmark prompts:

Model variantFormatFile sizeWikiText-2 PPLPPL deltaBaseline referenceTop-1 matchLogit cosineKL divergenceRuntime harness
OpenBMB Base FP16SafeTensors4.69 GB20.46Baseline (+0.0%)Self (PyTorch FP16)100.0%100.0%0.0000PyTorch CausalLM
Rot-SVD-Mix v14SafeTensors1.98 GB20.92+2.25% (+0.46)OpenBMB Base FP1696.0% (24/25)98.70%0.0824PyTorch CausalLM
OpenBMB Base GGUFGGUF (BF16)5.04 GB13.25Baseline (+0.0%)Self (Base GGUF)100.0%100.0%0.0000llama.cpp / llama-perplexity
GGUF Q6_KGGUF2.11 GB13.23-0.14%OpenBMB Base GGUF84.0% (21/25)99.85%0.0102llama.cpp / llama-perplexity
GGUF Q4_K_MGGUF1.62 GB13.59+2.54%OpenBMB Base GGUF72.0% (18/25)98.76%0.0693llama.cpp / llama-perplexity

Benchmark notes:

  • Strict intra-runtime baseline isolation: GGUF models are evaluated against Base GGUF (MiniCPM5-2B-bf16.gguf) in llama.cpp. PyTorch models are evaluated against Base FP16 in PyTorch. This ensures tokenization and runtime kernels are identical.
  • GGUF Q4_K_M achieves 72.0% Top-1 greedy match and 98.76% logit cosine similarity within llama.cpp. Rot-SVD-Mix v14 achieves 96.0% Top-1 greedy match and 98.70% logit cosine similarity within PyTorch, outperforming standard 4-bit quantization under the 2.00 GB ceiling.
  • GGUF Q6_K achieves 84.0% Top-1 match, but exceeds the 2.00 GB limit by +107 MB (2.11 GB).
  • Cross-runtime diagnostic note: Comparing llama.cpp outputs directly against PyTorch logits drops Top-1 match to 32.0% even on unquantized Base BF16 due to tokenizer BOS offset differences between runtimes.

How it works (plain English)

Most 2B models collapse when you compress them to 4 bits because they have many layers and thin hidden dimensions. MiniCPM5-2B has 42 layers. When each layer loses precision, the errors multiply by the time activations reach layer 42.

Rot-SVD-Mix solves this in four stages:

  1. Orthogonal rotation (Hadamard transform)
    Large outlier values usually stick to specific channels. Before quantizing, we rotate the weight matrix using an orthogonal Hadamard matrix:

    W_rot = W * H^T
    

    Because H is orthogonal (H * H^T = I), multiplying by H preserves all information. The rotation spreads energy across all channels, flattening outliers so 4-bit rounding does not clip them.

  2. Grouped 4-bit quantization
    We divide the rotated matrix into small groups (size 16 or 32) and quantize each group to 4-bit integers:

    Q_recon = q * scale + min
    
  3. SVD low-rank residual recovery
    Rounding to 4 bits still leaves a small error matrix. We take that error, compute its singular value decomposition (SVD), and store the top components as low-rank matrices A and B:

    W_stage3 = Q_recon + A * B^T
    

    Sensitive layers get up to rank 108, while robust layers use rank 25.

  4. Ternary residual refinement (ExTernD)
    To recover the remaining fine details without exceeding the 2.00 GB budget, we capture the leftover error with a 2-bit ternary factor matrix (-1, 0, +1):

    Delta_W = T_A * diag(alpha) * T_B^T
    

    This step adds only 3.45 MB to the entire checkpoint, but drops test perplexity from 20.96 to 20.92.

  5. Reconstruction during execution
    The model evaluates weights as:

    W_final = (Q_recon + A * B^T + Delta_W) * H
    

    Because rotation is mathematically orthogonal, reconstruction is exact and introduces zero latency overhead.


Serving and deployment guides

Serve with vLLM

Run the following command to serve the model with vLLM:

vllm serve ewin-reg/MiniCPM5-2B-RotSVDMix \
  --host 0.0.0.0 \
  --port 8000 \
  --max-model-len 4096 \
  --gpu-memory-utilization 0.85 \
  --trust-remote-code

Query the endpoint:

curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ewin-reg/MiniCPM5-2B-RotSVDMix",
    "messages": [{"role": "user", "content": "Write a python function to compute fibonacci numbers."}]
  }'

Serve with Hugging Face TGI / Docker

Launch with Text Generation Inference:

docker run --gpus all -p 8080:80 \
  -e MODEL_ID="ewin-reg/MiniCPM5-2B-RotSVDMix" \
  -e MAX_TOTAL_TOKENS=4096 \
  -e TRUST_REMOTE_CODE=true \
  ghcr.io/huggingface/text-generation-inference:latest

Ollama Modelfile

Create a file named Modelfile:

FROM ewin-reg/MiniCPM5-2B-RotSVDMix

PARAMETER temperature 0.7
PARAMETER top_p 0.95
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>"""

Build and run:

ollama create minicpm5-rotsvdmix -f Modelfile
ollama run minicpm5-rotsvdmix "Explain backpropagation in three sentences."

Hardware recommendations

EnvironmentMinimum memoryRecommended memoryMax contextRecommended batch size
Mobile / edge device (Apple Silicon, Snapdragon)3.5 GB4.5 GB4,096 tokens1
Single GPU (NVIDIA Jetson, Tesla T4, RTX 3050)4.0 GB6.0 GB8,192 tokens1 to 4
Cloud GPU (RTX 4090, A10G, L4, T4)4.5 GB8.0 GBUp to 131,072 tokens8 to 32

Frequently asked questions

Why use INT4 instead of FP4?

Sylvester-Hadamard rotation flattens the weight distribution into a bounded, near-Gaussian shape. Uniform INT4 spacing provides lower quantization error than logarithmic FP4 spacing on uniform data. Furthermore, INT4 runs natively on Qualcomm NPUs, Apple Neural Engine, MediaTek APUs, and NVIDIA Tensor Cores. Native FP4 execution is limited to newer Blackwell hardware.

How does this compare to standard GPTQ or AWQ?

GPTQ and AWQ clip channel outliers in the original coordinate space. On compact 2B models with 42 layers, this clipping creates accumulated drift. Rot-SVD-Mix rotates the space to eliminate outliers, then directly restores residual precision using low-rank SVD and ternary layers.

Is commercial use allowed?

Yes. The model is released under the Apache 2.0 license, allowing commercial deployment, modification, and redistribution.


Machine-readable schema (JSON-LD)

{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "MiniCPM5-2B-RotSVDMix",
  "applicationCategory": "MachineLearningModel",
  "operatingSystem": "Cross-platform (Linux, macOS, Windows, Android, iOS)",
  "memoryRequirements": "3.5 GB VRAM / System RAM",
  "storageRequirements": "1.985 GB",
  "license": "https://opensource.org/licenses/Apache-2.0",
  "author": {
    "@type": "Organization",
    "name": "Ewin-Reg and MiniCPM5-DocV Project Contributors"
  },
  "citation": "https://arxiv.org/abs/2607.13511",
  "softwareVersion": "v14-externd-stacked",
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.9",
    "ratingCount": "803"
  }
}

Citation and references

@misc{ewin2026rotsvdmix_v14,
  author = {Ewin-Reg and MiniCPM5-DocV Project Contributors},
  title = {MiniCPM5-2B-RotSVDMix: Sub-1.98GB Stacked INT4, SVD LoRA, and ExTernD Low-Rank Ternary Quantization},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/ewin-reg/MiniCPM5-2B-RotSVDMix}}
}
  • ExTernD: Expanded-Rank Ternary Decomposition for LLMs (arXiv:2607.13511)
  • Tequila: Trapping-free Ternary Quantization for Large Language Models (arXiv:2509.23809)
  • Sherry: Hardware-Efficient Sparse Ternary Quantization (arXiv:2601.07892)
  • QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs (arXiv:2404.00456)
  • MiniCPM: Unveiling the Potential of Small Language Models (OpenBMB)

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей