---
title: Nanbeige4-3B-Thinking-2511-MNN
canonical_url: "https://www.modelscope.cn/models/MNN/Nanbeige4-3B-Thinking-2511-MNN"
md_url: "https://www.modelscope.cn/models/MNN/Nanbeige4-3B-Thinking-2511-MNN.md"
repository: MNN/Nanbeige4-3B-Thinking-2511-MNN
last_updated: 2026-11-18
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - text-generation
library_name:
  - mnn
frameworks:
  - MNN
language:
  - zh
  - en
domain:
  - nlp
downloads: 90
stars: 1
---

# Nanbeige4-3B-Thinking-2511-MNN

> Nanbeige4-3B-Thinking-2511-MNN - MNN 在 ModelScope 开源的模型。Nanbeige4-3B-Thinking-2511-MNN

MNN/Nanbeige4-3B-Thinking-2511-MNN 是 ModelScope 魔搭社区上的text-generation模型，采用 apache-2.0 许可。

- **Repository**: MNN/Nanbeige4-3B-Thinking-2511-MNN
- **License**: apache-2.0
- **Tasks**: text-generation
- **Downloads**: 90
- **Stars**: 1
- **Last updated**: 2026-11-18

Source: https://www.modelscope.cn/models/MNN/Nanbeige4-3B-Thinking-2511-MNN

---

# Nanbeige4-3B-Thinking-2511-MNN

Nanbeige4-3B-Thinking-2511 是 Nanbeige4-3B-Thinking-2510 的增强版本，通过知识蒸馏和针对性的强化学习优化推理能力。本仓库提供其 MNN 量化版本。

## 模型信息

| 项目 | 配置 |
| --- | --- |
| 原始模型 | [nanbeige/Nanbeige4-3B-Thinking-2511](https://modelscope.cn/models/nanbeige/Nanbeige4-3B-Thinking-2511/summary) · [Hugging Face](https://huggingface.co/Nanbeige/Nanbeige4-3B-Thinking-2511) |
| MNN 仓库 | [Hugging Face](https://huggingface.co/taobao-mnn/Nanbeige4-3B-Thinking-2511-MNN) · [ModelScope](https://modelscope.cn/models/MNN/Nanbeige4-3B-Thinking-2511-MNN/summary) |
| 输入 / 输出 | 文本 / 文本 |
| 架构 / 层数 / hidden_dim | `llama` / 32 / 2560 |
| 语言主干 | HQQ 4-bit；group=64；alpha_bytes=2（FP16） |
| LM 输出头 | HQQ 4-bit；group=64；alpha_bytes=2（FP16） |
| 输入嵌入 | 独立 BF16 文件 `embeddings_bf16.bin` |
| 默认运行 | CPU；thread_num=4；precision=low；memory=low |

## 下载

文件包括 `llm.mnn`、`llm.mnn.weight`、`tokenizer.mtok` 及配置与模板；嵌入布局见上表。须整包配套更新，不混用修订，只清理应用自管的旧缓存。

```bash
python -m pip install -U modelscope
modelscope download --model MNN/Nanbeige4-3B-Thinking-2511-MNN --local_dir ./Nanbeige4-3B-Thinking-2511-MNN
```

或使用 HF 镜像：

```bash
python -m pip install -U huggingface_hub
HF_ENDPOINT=https://hf-mirror.com hf download taobao-mnn/Nanbeige4-3B-Thinking-2511-MNN --local-dir ./Nanbeige4-3B-Thinking-2511-MNN
```

## 运行

已验证 **MNN 3.6.2**，运行时提交 `4756b19d51ddeaf0a73bbc9f230dea6d930f442e`。其他版本需自行回归。在新目录编译：

需 [PR #5155](https://github.com/alibaba/MNN/pull/5155) 的模板与特殊 token 修复；验收使用的 PR 快照当时尚未合并，转换提交不能替代该运行时。

```bash
git clone https://github.com/alibaba/MNN.git
git -C MNN fetch origin pull/5155/head
git -C MNN checkout 4756b19d51ddeaf0a73bbc9f230dea6d930f442e
(cd MNN && ./schema/generate.sh)
cmake -S MNN -B MNN/build -DCMAKE_BUILD_TYPE=Release -DMNN_BUILD_LLM=ON -DMNN_LOW_MEMORY=ON -DMNN_SUPPORT_TRANSFORMER_FUSE=ON -DMNN_SEP_BUILD=OFF
cmake --build MNN/build --parallel 4
```

保持 [config.json](config.json) 与 [llm_config.json](llm_config.json) 的默认设置；未声明采样参数使用已验证运行时默认。随包配置 `max_new_tokens=4096`。

思考模式：`forced`；Jinja context=`null`，保持随包设置，不擅自关闭强制思考。

```bash
printf '%s\n' '请把“Good morning”翻译成中文。' > prompt.txt
./MNN/build/llm_demo ./Nanbeige4-3B-Thinking-2511-MNN/config.json prompt.txt
```

## 验证与导出

2026-11-18 在 x64 CPU 完成 FP32 映射对齐（prefill/decode，完整 32 层）；问候、算术与翻译用例的确定性检查（greedy、precision=high、8 线程）预定义期望通过，模板与输入 token 一致。真实默认 smoke 结构检查通过、自然停止且未超限，不代表默认输出准确率；输入为 38–800 token，不是最大上下文验证。

仅验证 x64 CPU；ARM CPU FP16、Metal、OpenCL、Vulkan、CUDA 及移动设备均未验证，未发布性能或设备内存测量。

转换使用提交 [`b0239771b07b317a258fbc384683bbd540741406`](https://github.com/alibaba/MNN/tree/b0239771b07b317a258fbc384683bbd540741406/transformers/llm/export)；实际参数见 [export_args.json](export_args.json)，配置与验证摘要见 [refresh_metadata.json](refresh_metadata.json)。重新导出需重新验收，不保证跨依赖版本字节一致。

## 许可证

沿用 [Apache License 2.0](https://huggingface.co/Nanbeige/Nanbeige4-3B-Thinking-2511/blob/main/README.md)。上游仓库没有 LICENSE 文件，本仓库也未附带。链接为上游许可声明或许可原文，不代表随包许可文本。使用须遵守上游许可与署名要求；量化转换不扩大授权，MNN 工具许可不替代模型许可。
