/ Модель

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

Контекст
262 144 токена
Параметры
3,2 млрд
Размер весов
8,3 ГБ
Лицензия
Apache 2.0
Архитектура
nanbeige · dense
Базовая модель
Nanbeige4.2-3B
Библиотека
transformers
Опубликована
2 авг 2026

Nanbeige4.2-3B-ARA-heresy

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

Дообученная Nanbeige4.2-3B с уменьшенной склонностью к отказам для диалоговой генерации текста и общих запросов.

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

Бенчмарки

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

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

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

  • MathArena/hmmt_feb_2026

    score

    Результат

    82,1

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • SWE-bench/SWE-bench_Verified

    score

    Результат

    63,6

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • ScaleAI/SWE-bench_Pro

    score

    Результат

    46,9

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • Idavidrein/gpqa

    score

    Результат

    87,4

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • cais/hle

    score

    Результат

    17,8

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • claw-eval/Claw-Eval

    score

    Результат

    52,2

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

  • harborframework/terminal-bench-2.0

    score

    Результат

    44,1

    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

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

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

MuXodious/Nanbeige4.2-3B-ARA-heresy — дообученная версия Nanbeige4.2-3B, созданная с помощью Heretic и Arbitrary-Rank Ablation с нормализацией строк весов. Проект разработал MuXodious на основе модели Nanbeige; README сообщает, что финальный вариант выбрали по результатам PiQA. В эксперименте число отказов снизилось с 535 из 540 до 9 из 540, при этом измеренная KL-дивергенция составила 0,0824.

Модель предназначена для генерации текста в диалогах и может использоваться как менее склонный к отказам вариант базовой модели для общих запросов, рассуждений, программирования и агентных сценариев. Базовое семейство Nanbeige4.2-3B рассчитано на вызов инструментов и многошаговые рабочие процессы; сама карточка этой версии не приводит отдельных оценок её агентных возможностей. Это плотная причинная языковая модель архитектуры NanbeigeForCausalLM на 3,2 млрд параметров с контекстом до 262 144 токенов. В метаданных указаны английский и китайский языки.

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

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

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

Ограничения

Снижение склонности к отказам может ослабить защитное поведение модели. Результаты отбора по PiQA и показатели из README не гарантируют качество на других задачах.

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

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

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

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

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

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

Открыть на Hugging Face

This is a Nanbeige4.2-3B fine-tune, produced through P-E-W's Heretic (v1.4.0) abliteration engine with Arbitrary-Rank Ablation and Row Normalisation enabled.

Note: The final trial selection was made based on PiQA scores.


Heretication Results

Score MetricValueParameterValue
Refusals9/540start_layer_index10
KL Divergence0.0824end_layer_index22
Initial Refusals535/540preserve_good_behavior_weight0.4448
steer_bad_behavior_weight0.0003
overcorrect_relative_weight1.1721
neighbor_count2

Appendix

Empty system prompt. Custom dataset

   [Trial 457] Refusals:  0/540, KL divergence: 2.0660
   [Trial 456] Refusals:  1/540, KL divergence: 0.8068
   [Trial  39] Refusals:  3/540, KL divergence: 0.3655
   [Trial 303] Refusals:  6/540, KL divergence: 0.1144
   [Trial 318] Refusals:  8/540, KL divergence: 0.1107
 » [Trial 194] Refusals:  9/540, KL divergence: 0.0824
   [Trial 452] Refusals: 11/540, KL divergence: 0.0625
   [Trial 455] Refusals: 20/540, KL divergence: 0.0569
   [Trial 192] Refusals: 25/540, KL divergence: 0.0420
   [Trial 447] Refusals: 34/540, KL divergence: 0.0286
   [Trial 444] Refusals: 237/540, KL divergence: 0.0260
   [Trial 453] Refusals: 317/540, KL divergence: 0.0232
   [Trial 448] Refusals: 372/540, KL divergence: 0.0148
   [Trial 439] Refusals: 488/540, KL divergence: 0.0143
   [Trial 206] Refusals: 516/540, KL divergence: 0.0076
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Benchmark ┃ Metric               ┃    T452    ┃ Original model ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ PIQA      │ name                 │       piqa │           piqa │
│           │ sample_len           │       1838 │           1838 │
│           │ acc,none             │     0.7078 │         0.7165 │
│           │ acc_stderr,none      │     0.0106 │         0.0105 │
│           │ acc_norm,none        │     0.7203 │         0.7291 │
│           │ acc_norm_stderr,none │     0.0105 │         0.0104 │
└───────────┴──────────────────────┴────────────┴────────────────┘
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Benchmark ┃ Metric               ┃    T194    ┃ Original model ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ PIQA      │ name                 │       piqa │           piqa │
│           │ sample_len           │       1838 │           1838 │
│           │ acc,none             │     0.7144 │         0.7165 │
│           │ acc_stderr,none      │     0.0105 │         0.0105 │
│           │ acc_norm,none        │     0.7252 │         0.7291 │
│           │ acc_norm_stderr,none │     0.0104 │         0.0104 │
└───────────┴──────────────────────┴────────────┴────────────────┘
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Benchmark ┃ Metric               ┃    T318    ┃ Original model ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ PIQA      │ name                 │       piqa │           piqa │
│           │ sample_len           │       1838 │           1838 │
│           │ acc,none             │     0.7122 │         0.7165 │
│           │ acc_stderr,none      │     0.0106 │         0.0105 │
│           │ acc_norm,none        │     0.7258 │         0.7291 │
│           │ acc_norm_stderr,none │     0.0104 │         0.0104 │
└───────────┴──────────────────────┴────────────┴────────────────┘
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Benchmark ┃ Metric               ┃    T455    ┃ Original model ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ PIQA      │ name                 │       piqa │           piqa │
│           │ sample_len           │       1838 │           1838 │
│           │ acc,none             │     0.7122 │         0.7165 │
│           │ acc_stderr,none      │     0.0106 │         0.0105 │
│           │ acc_norm,none        │     0.7203 │         0.7291 │
│           │ acc_norm_stderr,none │     0.0105 │         0.0104 │
└───────────┴──────────────────────┴────────────┴────────────────┘

1. Introduction

Nanbeige4.2-3B is a compact agentic model built on Nanbeige4.2-3B-Base, designed to combine strong agentic behavior with broad reasoning and alignment capabilities. Its Looped Transformer architecture reuses the transformer layers to increase model capacity without adding parameters. With only 3B non-embedding parameters, the model delivers solid performance on general-agent and code-agent tasks.

During supervised fine-tuning (SFT), we expand the diversity of training environments through real-world environment integrations and large-scale environment synthesis. We further diversify task types, task assets, and the agentic scaffolds used for each task. To ensure training data quality, we apply filtering at both the trajectory and turn levels, combining test-case-based validation with rubric-based assessment. During reinforcement learning (RL), we combine outcome and process rewards to improve training stability for the compact model.

Key strengths include:

  • Solid Agentic Behavior at the 3B Scale: Across complex tool-use, office-agent, and code-agent benchmarks, Nanbeige4.2-3B outperforms larger models such as Qwen3.5-9B and Gemma4-12B.

  • Strong Reasoning Capabilities: Nanbeige4.2-3B leads open-source models of comparable size across mathematical, coding, and scientific reasoning tasks, continuing the strong reasoning performance of Nanbeige4.1-3B.

  • Local Personal Assistant: When integrated with an agentic scaffold designed for personal workflows (e.g., OpenClaw), Nanbeige4.2-3B can support extended tasks spanning daily assistance, office work, and deep research.

The accompanying modeling_nanbeige.py also includes our latest architectural improvements, including LoopSplit, mHC with depth attention, and concatenated n-gram embeddings. These features have been incorporated into Nanbeige4.5, whose training is underway for release later in 2026.

2. Model Performance

General and Agentic Capabilities

We compare Nanbeige4.2-3B with Qwen3.5 and Gemma4 models across a diverse benchmark suite covering general agents, code agents, reasoning, and alignment capabilities.

The results demonstrate that Nanbeige4.2-3B delivers strong performance well beyond its parameter scale. With only 3B non-embedding parameters, it consistently outperforms larger models, including Qwen3.5-9B and Gemma4-12B, across general-agent, code-agent, and reasoning benchmarks, while remaining competitive on alignment tasks.

Local Personal Assistant

With only 3B non-embedding parameters, Nanbeige4.2-3B is compact enough for local deployment while retaining the agentic capabilities needed for multi-step workflows, making it a natural fit for local personal-assistant applications. To assess this use case in a practical and consistent agent environment, we use OpenClaw, a general-purpose framework that supports daily assistance, office workflows, and deep research tasks. All compared models use the same framework and are evaluated on tasks requiring multi-step interaction with tools and external resources.

Across all six benchmarks, Nanbeige4.2-3B outperforms both Qwen3.5-4B and the larger Qwen3.5-9B. These results support its use as a compact local personal assistant.

3. Quickstart

The tokenizer provides a configurable chat template for reasoning and tool-use scenarios:

  • enable_thinking controls whether the model generates reasoning for the current response. It is enabled by default; set it to False for non-thinking mode.
  • preserve_thinking controls whether reasoning from previous assistant turns is retained in a multi-turn conversation. We recommend False for general chat and question answering, and True for multi-turn tool use, office tasks, and code-agent workflows.
  • Passing tools enables the tool-use template. We recommend tool_call_format="xml" for the best tool-calling performance; json is also supported for compatibility.

The model supports a context length of up to 262,144 tokens (256K).

We recommend adjusting the inference settings according to the target scenario:

ScenarioTemperatureMax New Tokens
Agentic and tool-use tasks1.065,536
Reasoning and chat tasks0.6131,072

Huggingface

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Nanbeige/Nanbeige4.2-3B"

tokenizer = AutoTokenizer.from_pretrained(
  model_id,
  use_fast=False,
  trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
  model_id,
  torch_dtype="auto",
  device_map="auto",
  trust_remote_code=True
)

messages = [
  {"role": "user", "content": "Which number is bigger, 9.11 or 9.8?"}
]
prompt = tokenizer.apply_chat_template(
  messages,
  add_generation_prompt=True,
  tokenize=False
)
input_ids = tokenizer(
  prompt,
  add_special_tokens=False,
  return_tensors="pt"
).input_ids
output_ids = model.generate(
  input_ids.to("cuda"),
  max_new_tokens=131072,
  temperature=0.6,
  top_p=0.95,
  top_k=20,
  eos_token_id=166101
)
response = tokenizer.decode(
  output_ids[0][len(input_ids[0]):],
  skip_special_tokens=True
)
print(response)

SGLang

Installation

# Clone repository
git clone -b nbg42 https://github.com/Nanbeige/sglang.git
cd sglang
pip install -e "python"

Usage

MODEL_PATH=/path/to/your/Nanbeige4.2-3B
python -m sglang.launch_server \
    --model-path ${MODEL_PATH} \
    --host 0.0.0.0 \
    --port 8000 \
    --tp-size 1 \
    --mem-fraction-static 0.8  \
    --reasoning-parser nanbeige \
    --tool-call-parser nanbeige

vLLM

Installation

# Clone repository
git clone -b nanbeige42 https://github.com/Nanbeige/vllm.git
cd vllm
pip install -e .

Usage

MODEL_PATH=/path/to/your/Nanbeige4.2-3B
vllm serve ${MODEL_PATH} \
    --host 0.0.0.0 \
    --port 8000 \
    --tensor-parallel-size 1 \
    --gpu-memory-utilization 0.8  \
    --enable-auto-tool-choice \
    --tool-call-parser nanbeige \
    --reasoning-parser nanbeige

llama.cpp

Installation

# Clone repository
git clone -b nanbeige42 https://github.com/Nanbeige/llama.cpp.git
cd llama.cpp

cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j

Usage

# input: HuggingFace model directory
MODEL_PATH_HF=/path/to/your/Nanbeige4.2-3B
# output: converted / quantized GGUF
MODEL_PATH_BF16_GGUF=/path/to/your/Nanbeige4.2-3B-BF16.gguf
MODEL_PATH_GGUF_Q4_K_M=/path/to/your/Nanbeige4.2-3B-Q4_K_M.gguf

# convert to gguf
python3 convert_hf_to_gguf.py ${MODEL_PATH_HF} \
  --outfile ${MODEL_PATH_BF16_GGUF} \
  --outtype bf16

# quantize to int4
./build/bin/llama-quantize \
  ${MODEL_PATH_BF16_GGUF} \
  ${MODEL_PATH_GGUF_Q4_K_M} \
  Q4_K_M

# run inference
./build/bin/llama-cli \
  -m ${MODEL_PATH_GGUF_Q4_K_M} \
  -ngl 99

If you want to use LM Studio: the bundled llama-server does not support nanbeige yet, so do these two steps:

  1. Put the GGUF under ~/.lmstudio/models/<org>/<name>/
  2. Copy this llama.cpp build outputs into the LM Studio backend: ${LLAMA_CPP_PATH}/build/bin/* -> BACKEND (example: ~/.lmstudio/extensions/backends/llama.cpp-mac-arm64-apple-metal-advsimd-2.25.2)

ollama

Requirements

  • Go
  • llama.cpp (see the llama.cpp section above)

Installation

# Clone repository
# For llama-server (GGUF) backend only, the official ollama repo also works:
# git clone https://github.com/ollama/ollama.git
git clone -b nanbeige42 https://github.com/Nanbeige/ollama.git
cd ollama

# Full native build (MLX Metal on macOS arm64; llama-server payload included)
# Pick one:
cmake -B build .
cmake --build build --parallel $(sysctl -n hw.ncpu)   # macOS
# cmake --build build --parallel $(nproc)             # Linux

# Copy the llama.cpp build output from the section above into Ollama's runtime payload dir
LLAMA_CPP_PATH=/path/to/your/llama.cpp
cp -r ${LLAMA_CPP_PATH}/build/bin/* build/lib/ollama/

go build .

Ollama supports two local inference backends:

PathModel formatBackendTypical use
llama-serverGGUFllama.cpp (Metal / CUDA / ...)Traditional GGUF quantized deployment
MLXHuggingFace safetensorsMLX (Apple Metal, etc.)Run BF16 or quantized safetensors directly

Usage — llama-server (GGUF)

# Option 1: pull a published model (no Modelfile on the client)
./ollama serve
./ollama run nanbeige/nanbeige4.2:3b-Q4_K_M
# Option 2: create from a local .gguf produced by llama.cpp
# (see convert_hf_to_gguf.py / llama-quantize above)
MODEL_PATH_GGUF_Q4_K_M=/path/to/your/Nanbeige4.2-3B-Q4_K_M.gguf

# Modelfile
cat > Modelfile <<EOF
FROM ${MODEL_PATH_GGUF_Q4_K_M}
PARAMETER temperature 0.6
PARAMETER top_p 0.95
PARAMETER top_k 20
EOF

./ollama serve
./ollama create nanbeige42-local -f Modelfile
./ollama run nanbeige42-local

Usage — MLX (safetensors)

# HuggingFace safetensors directory (config.json + *.safetensors), used directly.
# MLX Metal is for macOS arm64; Linux MLX needs a CUDA MLX backend build.
MODEL_PATH=/path/to/your/Nanbeige4.2-3B

# Modelfile
cat > Modelfile <<EOF
FROM ${MODEL_PATH}
RENDERER nanbeige
PARSER nanbeige
EOF

# Start server (from repo root so it finds build/lib/ollama)
./ollama serve

# Import safetensors model (requires --experimental)
./ollama create nanbeige42-mlx -f Modelfile --experimental

# Optional: quantize on import (int4 / int8 / mxfp4 / mxfp8 / nvfp4)
./ollama create nanbeige42-mlx-q4 -f Modelfile --experimental --quantize int4

# Run
./ollama run nanbeige42-mlx-q4

4. Limitations

While we place great emphasis on model safety throughout the training process, the model may still generate unexpected or inappropriate outputs due to its probabilistic nature. Such outputs may include inaccurate information, bias, discrimination, or other harmful content. Please do not propagate such content. We do not assume responsibility for consequences of disseminating inappropriate information.

5. Citation

If you find our model useful or would like to use it in your own work, please cite as follows:

@article{lab2026nanbeige4,
  title={Nanbeige4. 2-3B: Unlocking Agentic Capabilities in a Compact Mode},
  author={Lab, Nanbeige and Yang, Chen and Huang, Chengrui and Lan, Fufeng and Chen, Hanhui and Zhou, Hao and Song, Huatong and Cao, Jiaqi and Zhu, Jiaying and Niu, Jinlin and others},
  journal={arXiv preprint arXiv:2607.22083},
  year={2026}
}

6. Contact

If you have any questions, please open an issue in this repository or contact us at nanbeige@kanzhun.com.

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
NanbeigeForCausalLM
Ревизия весов
3655f8c

0 моделей