Instructions to use opencsg/Agentic-27B-V2-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use opencsg/Agentic-27B-V2-MLX-6bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("opencsg/Agentic-27B-V2-MLX-6bit") config = load_config("opencsg/Agentic-27B-V2-MLX-6bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use opencsg/Agentic-27B-V2-MLX-6bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "opencsg/Agentic-27B-V2-MLX-6bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "opencsg/Agentic-27B-V2-MLX-6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use opencsg/Agentic-27B-V2-MLX-6bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "opencsg/Agentic-27B-V2-MLX-6bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default opencsg/Agentic-27B-V2-MLX-6bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use opencsg/Agentic-27B-V2-MLX-6bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "opencsg/Agentic-27B-V2-MLX-6bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "opencsg/Agentic-27B-V2-MLX-6bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- OpenCSG Agentic-27B-V2-MLX-6bit
- 本仓库:MLX-6bit
- 快速开始
- 为什么 Agent 模型更需要量化,也更怕量化误差
- 全部版本一览
- 量化版和原版比:显存最多省五分之四,能力不掉
- 全尺寸覆盖:从机房到笔记本
- 效果保证:量化后,Agent 能力不掉
- 与其他量化发布的对比
- 使用协议
- This repo: MLX-6bit
- Quick start
- Why agent models need quantization more, and are more sensitive to its errors
- All variants
- Quantized vs. original: up to 80% less memory, no loss in capability
- Every hardware tier: from the server room to the laptop
- Quality: agent capability survives quantization
- What we built on
- 1. Responses generated by the model itself: half the loss at key agent steps
- 2. 70% full agent trajectories: the agent-heavy mix works best
- 3. Long sequences: up to 16K, matching real agent lengths
- 4. Chinese and English: Chinese as its own category, proven necessary
- 5. Only successful trajectories, with every data source tested
- 6. Strict decontamination and privacy scrubbing
- How we made these choices: 8 controlled experiments
- 7. Three levels of validation: every variant passes the same gate
- Comparison with other quantized releases
- License
- 本仓库:MLX-6bit
OpenCSG Agentic-27B-V2-MLX-6bit
同一个 Agent 模型,在任何设备上都能运行:14 个仓库、21 个版本
Run Agentic-27B-V2 on any kind of device: 14 repos, 21 builds
原模型 / Base model · OpenCSG 模型仓库 / Models · 使用协议 / License Agreement · 商业授权 / Commercial License
| 覆盖 / Coverage | 部署门槛 / Footprint | 保真度 / Fidelity | 任务成绩 / Tasks |
|---|---|---|---|
| 21 个版本 / 21 builds NVIDIA · 昇腾 · Apple · CPU |
62 GB → 13 GB 80GB 卡 → 16GB 卡 |
FP8 top-1 97.5% Q8_0 99.3% |
W4A16 ≈ BF16 AutomationBench · SWE-bench Pro |
本仓库:MLX-6bit
| 项目 | 值 |
|---|---|
| 量化方式 | MLX 6-bit |
| 适配硬件 | Apple Silicon Mac(M1–M5) |
| 推理引擎 | mlx-lm / mlx-vlm / LM Studio |
| 权重大小 | 22.8 GB |
| 预计显存(32K / 128K 上下文) | 24 GB / 30 GB |
hf download opencsg/Agentic-27B-V2-MLX-6bit
python -m mlx_vlm generate --model Agentic-27B-V2-MLX-6bit --prompt "你好"
不确定选哪个版本?在目标机器上运行本仓库的 python select_quant.py,它会按硬件的资源上限列出所有能跑的版本。下面是整个量化系列的完整说明。
Agentic-27B-V2 发布全尺寸量化版本,一次发布 14 个仓库、21 个可直接运行的版本,覆盖:
- NVIDIA:Ampere、Hopper、Blackwell 三代数据中心卡,以及 RTX 30/40/50 消费级显卡
- 华为昇腾:Atlas A2 / A3(910B、910C)
- Apple Silicon:M1–M5 全系 Mac
- llama.cpp 生态:Ollama、LM Studio,AMD / Intel 显卡和纯 CPU 都能跑
8-bit 版本在单张 48GB 卡上就能跑 32K 上下文,最小的版本(IQ2_M)只有 10.8GB。ModelScope、OpenCSG 社区、Hugging Face 三个平台同步上线:
ModelScope 合集 · OpenCSG 合集 · Hugging Face 合集
快速开始
在要部署的机器上运行仓库里的 select_quant.py,只需要 Python,不用装任何依赖:
python select_quant.py
它会读取这台机器的资源上限(显存或统一内存的总量),列出所有放得下的版本和各自需要的显存,并按推理引擎标出推荐。输入编号选定版本,再选择「下载」或「部署」:脚本给出对应的命令,按回车就直接帮你执行,部署完成后是一个 OpenAI 兼容的服务(默认端口 8000)。以一张 RTX 4090 为例:
检测到的硬件: NVIDIA GeForce RTX 4090 × 1, 24 GB, compute capability 8.9
按硬件的资源上限估算,上下文 32,768 tokens
# 版本 权重 预计显存 推理引擎 top-1 一致率
1 EXL3-3.0bpw 13.5 GB 15.6 GB ExLlamaV3 / TabbyAPI 95.9% ← 推荐
2 EXL3-2.5bpw 12.0 GB 14.2 GB ExLlamaV3 / TabbyAPI 93.8%
3 GGUF Q5_K_M 19.8 GB 21.5 GB llama.cpp / Ollama / LM Studio 98.4% ← 推荐
4 GGUF Q4_K_M 17.2 GB 19.1 GB llama.cpp / Ollama / LM Studio 97.3%
5 GGUF IQ4_XS 15.8 GB 17.8 GB llama.cpp / Ollama / LM Studio 97.0%
6 GGUF Q3_K_M 14.0 GB 16.1 GB llama.cpp / Ollama / LM Studio 94.5%
7 GGUF IQ3_XXS 11.9 GB 14.2 GB llama.cpp / Ollama / LM Studio 93.0%
8 GGUF IQ2_M 10.8 GB 13.1 GB llama.cpp / Ollama / LM Studio 90.3%
另有 6 个版本超出资源上限,未列出(--all 查看)。
请输入编号选择版本 [默认 1]: 4
接下来要做什么?
1) 下载模型
2) 部署模型(下载并启动 OpenAI 兼容服务)
请选择 [默认 1]: 2
csghub-cli download OpenCSG/Agentic-27B-V2-GGUF Agentic-27B-V2-Q4_K_M.gguf --local-dir Agentic-27B-V2-GGUF
llama-server -m ./Agentic-27B-V2-GGUF/Agentic-27B-V2-Q4_K_M.gguf \
-c 32768 --jinja -ngl 99 --port 8000
需要我帮你执行吗?
1) 执行
2) 不用,我自己来
请选择 [默认 1]:
正在执行……
还没拿到机器时,可以手动指定硬件,例如 python select_quant.py --device apple --mem 36;需要 128K 上下文时加 --ctx 131072。
也可以直接手动部署:
# vLLM:FP8 / INT8 / NVFP4 / W4A16 / W4AFP8
vllm serve ./Agentic-27B-V2-FP8 --max-model-len 32768 --trust-remote-code \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_xml \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'
# llama.cpp:GGUF(Ollama、LM Studio 可以直接加载 GGUF 文件)
llama-server -m Agentic-27B-V2-Q4_K_M.gguf --mmproj mmproj-Agentic-27B-V2-F16.gguf \
-c 65536 --jinja -ngl 99
昇腾用 vLLM-Ascend,参数与 vLLM 相同;显存充足时,--max-model-len 可以开到 262144。
为什么 Agent 模型更需要量化,也更怕量化误差
工具的输出是用户的私有数据,模型要能在本地有限的资源下部署
对话模型读到的是用户写的一句话。Agent 模型读到的是工具返回的结果:本地文件、邮件、数据库查询、代码仓库、内部系统的 API 响应。这些内容属于用户和企业,不属于模型输出,很多时候也不允许离开本机或内网。
所以 Agent 模型往往要私有化、本地化部署。能不能部署,首先取决于模型放不放得下:
- BF16 原版至少要一张 80GB 的数据中心卡。
- 大多数开发者手里是 16–32GB 的显卡或 Mac。
- 大多数企业机房里是 A100 / A800、H20、L40S、昇腾 910B 这类卡。
量化决定了模型能进到多少台设备里。
一个任务几十上百次调用,误差会一路累积
Agent 完成一个任务,要连续做几十到上百次决策。以 AutomationBench 为例,一道题 V2 就要调用约 40 次工具、累计读入约 40 万 token;SWE-bench Pro 上平均每道题要生成约 3.5 万 token。
任何一步出错都会让后面全部白做,例如调错接口、填错参数、改错一行代码:
| 每一步的正确率 | 连续 20 步全对 | 连续 50 步全对 | 连续 100 步全对 |
|---|---|---|---|
| 99.9% | 98.0% | 95.1% | 90.5% |
| 99.5% | 90.5% | 77.8% | 60.6% |
| 99.0% | 81.8% | 60.5% | 36.6% |
单步上千分之几的偏差,在 PPL 上几乎看不出来,经过几十步累积却会明显拉低任务成功率。所以 Agent 模型的量化不能只看 PPL 和通用题库,要盯住模型在关键决策点上还能不能做出和原模型一样的动作。这一版的校准和验收都围绕这一点设计,最终 4-bit 版本的端到端任务成绩与 BF16 持平。
全部版本一览
| 版本 | 量化方式 | 适配硬件 | 推理引擎 | 权重 | 预计显存 32K / 128K |
效果 top-1 一致率 |
|---|---|---|---|---|---|---|
| BF16(原版) | — | 80GB 数据中心卡 | vLLM / SGLang | 55.6 GB | 62 / 69 GB | 100% |
| FP8 | FP8 block 128 | Hopper、Blackwell、Ada | vLLM / SGLang | 31.3 GB | 37 / 44 GB | 97.5% |
| NVFP4 | NVFP4 W4A4,GPTQ | Blackwell | vLLM | 20.6 GB | 26 / 33 GB | 96.9% |
| W4A16-G32 | INT4 权重,GPTQ,group 32 | Ampere 及以上 | vLLM / SGLang | 20.6 GB | 26 / 33 GB | 96.9% |
| INT8 | W8A8,SmoothQuant + GPTQ | Ampere 及以上 | vLLM | 31.3 GB | 37 / 44 GB | 96.5% |
| W4A16 | INT4 权重,GPTQ,group 128 | Ampere 及以上 | vLLM / SGLang | 19.5 GB | 25 / 32 GB | 96.4% |
| W4AFP8 | INT4 权重 + FP8 激活 | Hopper | vLLM | 19.5 GB | 25 / 32 GB | 95.8% |
| EXL3-3.0bpw | EXL3(QTIP) | Ampere 及以上单卡 | ExLlamaV3 / TabbyAPI | 13.5 GB | 16 / 22 GB | 95.9% |
| EXL3-2.5bpw | EXL3(QTIP) | Ampere 及以上单卡 | ExLlamaV3 / TabbyAPI | 12.0 GB | 14 / 20 GB | 93.8% |
| Ascend-W8A8 | msModelSlim W8A8 | 昇腾 Atlas A2 / A3 | vLLM-Ascend | 32.1 GB | 39 / 45 GB | — |
| MLX-8bit | MLX 8-bit | Apple Silicon | mlx-lm / mlx-vlm / LM Studio | 29.5 GB | 31 / 37 GB | — |
| MLX-6bit | MLX 6-bit | Apple Silicon | 同上 | 22.8 GB | 24 / 30 GB | — |
| MLX-4bit | MLX 4-bit,group 64 | Apple Silicon | 同上 | 16.1 GB | 18 / 24 GB | — |
| MLX-MXFP4 | MXFP4 | Apple Silicon | 同上 | 15.2 GB | 17 / 23 GB | — |
GGUF 共 8 档,放在同一个仓库 Agentic-27B-V2-GGUF,另附视觉投影 mmproj(0.93GB):
| 档位 | 文件大小 | 预计显存 32K / 128K | top-1 一致率 | 适合 |
|---|---|---|---|---|
| Q8_0 | 29.0 GB | 30 / 36 GB | 99.3% | 32GB 显卡、48GB 以上的 Mac |
| Q6_K | 22.5 GB | 24 / 30 GB | 98.8% | 32GB 显卡、36GB 以上的 Mac |
| Q5_K_M | 19.8 GB | 22 / 28 GB | 98.4% | 24GB 显卡 |
| Q4_K_M | 17.2 GB | 19 / 25 GB | 97.3% | 24GB 显卡、32GB Mac 的首选 |
| IQ4_XS | 15.8 GB | 18 / 24 GB | 97.0% | 24GB 显卡,需要更长上下文时 |
| Q3_K_M | 14.0 GB | 16 / 22 GB | 94.5% | 16GB 显卡(缩短上下文) |
| IQ3_XXS | 11.9 GB | 14 / 20 GB | 93.0% | 16GB 显卡、24GB Mac |
| IQ2_M | 10.8 GB | 13 / 19 GB | 90.3% | 16GB 显卡,最低门槛(12GB 显卡需把上下文缩到 8K 左右) |
量化版和原版比:显存最多省五分之四,能力不掉
部署门槛:从一张 80GB 卡,降到一张 16GB 卡。 按 32K 上下文估算:
| 版本 | 显存 | 能跑的硬件 |
|---|---|---|
| BF16 原版 | 约 62GB | 一张 80GB 数据中心卡 |
| FP8 | 约 37GB | L40S、RTX 6000 Ada 这类 48GB 卡 |
| 4-bit | 约 25GB | RTX 5090 跑 vLLM |
| GGUF Q4_K_M | 约 19GB | 24GB 消费级显卡、32GB 的 Mac |
| IQ2_M | 约 13GB | 16GB 显卡 |
同一张卡上能留出更多上下文和并发。 在一张 H20(96GB)上:
- BF16 放完权重后,只剩约 28GB 给 KV cache;FP8 剩约 52GB,W4A16 剩约 64GB。
- V2 每 1K token 的 KV cache 只要 64MB。W4A16 比 BF16 多出的约 36GB,相当于多支持约 55 万 token 的并发上下文。
更快的低精度计算。 FP8、NVFP4、INT8 都直接用硬件原生的低精度张量核心计算;4-bit 权重版本在解码时主要节省显存带宽。同底座 Qwen3.8-27B 的公开研究(Minima,arXiv:2609.04098)测得,NVFP4 相比 BF16 解码快 1.86 倍。
能力不掉。 FP8 与原版的 top-1 一致率为 97.5%,GGUF Q5_K_M 及以上为 98.4%–99.3%;4-bit 的 W4A16 在 AutomationBench 和 SWE-bench Pro 上的端到端成绩与 BF16 持平。详见质量保证。
全尺寸覆盖:从机房到笔记本
我们没有只挑一两种流行格式,而是先盘点开发者和企业实际在用的硬件,再给每一类硬件找原生最合适的格式:
| 硬件类别 | 典型设备 | 我们的版本 | 为什么是它 |
|---|---|---|---|
| Hopper 数据中心卡 | H100、H200、H20、H800 | FP8、W4AFP8、W4A16 | Hopper 有原生 FP8 Tensor Core。FP8 的布局和 Qwen 官方 FP8 一致,W4AFP8 面向大 batch 高并发 |
| Blackwell | B200、B300、RTX 50、RTX PRO 6000 | NVFP4 | Blackwell 原生支持 FP4,体积是 FP8 的三分之二 |
| Ampere / Ada | A100、A800、A10、L40S、RTX 30/40 | INT8、W4A16、W4A16-G32 | Ampere 没有 FP8 Tensor Core,FP8 在上面只省显存、不提速;INT8 W8A8 才能真正加速。国内私有化部署大量使用 A800 / A100 |
| 华为昇腾 | Atlas A2 / A3(910B、910C) | Ascend-W8A8 | 采用 msModelSlim 官方 W8A8 配方,直接用 vLLM-Ascend 部署 |
| 消费级显卡 | RTX 3060–5090、RX 7900 | GGUF ×8、EXL3 ×2 | 从 10.8GB 到 29GB 共 10 档,16GB 到 32GB 显存都有能完整放进显存的版本 |
| Apple Silicon | M1–M5 的 MacBook、Mac mini、Mac Studio | MLX ×4、GGUF | MLX 是 Mac 原生框架;GGUF 可以在 Ollama、LM Studio 里一键运行 |
| CPU、其他显卡 | x86 / ARM 服务器、AMD / Intel 显卡 | GGUF | llama.cpp 支持 CUDA、ROCm、Vulkan、Metal 和纯 CPU |
这套组合覆盖了开发者实际用来跑本地模型的主流硬件:
- Hugging Face 硬件普查(2026 年,约 30 万用户自填)的四大类硬件,NVIDIA 47%、CPU 26%、Apple Silicon 18%、AMD 8%,合计 99%,每一类都有对应版本。
- 普查里本地 AI 最常用的显卡,RTX 3090、5090、4090、5070 Ti、5060 Ti 都能把至少一个版本完整放进显存;12GB 的 RTX 3060 可以用 IQ2_M 跑 8K 左右的上下文。
- 国内数据中心:按 IDC 的统计,2026 年上半年国内 AI 加速卡出货中,NVIDIA 占 34%,华为昇腾占 28%。这两个平台我们都有原生版本。
数据来源:Hugging Face Hardware、Hardware setups on HF(2026-05)、IDC 2026 上半年中国 AI 加速卡份额(TechNode 转引,2026-10)。
效果保证:量化后,Agent 能力不掉
用量化版,最关心的是能力会不会打折。我们的结果是:
| 与原版相比 | |
|---|---|
| 4-bit(W4A16)端到端任务 | AutomationBench 保持 **99.1%**,SWE-bench Pro 保持 100% |
| FP8 | 输出 top-1 一致率 **97.5%**,Agent 关键步骤上做出正确动作的概率只下降约 0.2% |
| GGUF Q5_K_M 及以上 | top-1 一致率 **98.4%–99.3%**,基本无损 |
| 所有 vLLM 版本 | 全部通过同一道 Agent 质量门槛才发布 |
能做到这一点,是因为我们在校准和验证上做了这些事:
- 回复由模型自己生成:量化时看到的就是模型部署后的真实行为,Agent 关键步骤损失只有通用做法的一半。
- 70% 是完整的 Agent 轨迹:多次工具调用、真实工具返回、最终答案都在里面。
- 长序列:单条最长 16K,覆盖 Agent 的真实长度。
- 中英双语:中文单独成类。
- 只收做对的轨迹:数据来源逐一做过对照。
- 严格去污染、去隐私:10 个评测集重叠命中 0 条。
- 三层验证:token 级、235 个 Agent 关键步骤、端到端任务,逐版本公开。
每一个选择都经过对照实验:8 套校准集、约 37 次量化、约 32 轮质量评测。下面逐项展开。
我们参考了谁
- 第一方厂商:NVIDIA 发布 Nemotron 量化版时,用的是自家后训练数据,而不是通用文本;Google Gemma、Meta Llama 的量化版也以自家后训练分布为准。
- 社区和工具厂商:RedHat 用通用指令集 open-perfectblend(512 条 × 4K,这是我们实验里的对照组 B0);Unsloth 强调指令模型必须套对话模板、校准集和验收集必须分开;bartowski 在 Q2_K 上实测,换一套校准语料,BFCL 工具调用分数能差约 10 分;Intel AutoRound 开始提供 Agent 专用校准集。
- 学术研究:COLA、FAQ、Self-calibration 等工作发现,校准数据来源的影响可以超过不同量化方法之间的差距,模型自己生成的校准数据效果更好;同领域校准能把 INT3 的推理准确率从 28% 拉回 65%。
结论很明确:要用模型自己的、和目标任务同类的数据来校准。
一、回复由模型自己生成:Agent 关键步骤损失减半
量化算法根据校准数据产生的激活,来决定每一层怎么取舍。如果校准数据是别的模型写的,量化时看到的激活就和模型部署后真实产生的不一样。
- 单轮数据:提交约 3,300 条 prompt,回复全部由 Agentic-27B-V2 BF16 重新生成,保留 3,141 条完整、可解析的结果。
- 多轮工具轨迹:保留真实的工具返回,最后一轮由 V2 生成。
- SWE 代码轨迹:取自与 V2 同底座的 Qwen3.8-27B 生成的轨迹。
- 渲染格式:全部用 V2 自己的对话模板渲染,包括 tools 定义、thinking 和
qwen3_xml工具调用,和部署时完全一致。
效果:同一个 W4A16 配方下,换成业界通用的校准集(B0)后,Agent 关键步骤上的损失是我们的 2 倍,token 级 KL 高 **40%**,思考长度也更长。
二、70% 是完整的 Agent 轨迹:Agent 加重的配比最好
| 大类 | 子类 | 来源 | 占比 |
|---|---|---|---|
| Agent 与工具 70% | 多轮工具使用(业务流程类) | nvidia/Nemotron-Agentic-v1 · interactive_agent | 约 30% |
| SWE 代码 Agent | nvidia/Open-SWE-Traces · Qwen3.8-27B 同底座生成的子集(mini-swe-agent + OpenHands) | 约 22% | |
| 单步 / 多步工具调用 | Nemotron-Agentic-v1 · tool_calling | 约 18% | |
| 通用推理 20% | 对话、代码 | open-perfectblend 的 ultrachat、ultrafeedback、lmsys-arena、AutoIF、evol-codealpaca、UltraInteract | 约 13% |
| 数学、STEM | Nemotron-Post-Training-v1 · math / stem | 约 7% | |
| 中文 7% | 中文对话、中文 Agent | OpenCSG/smoltalk_chinese 等 | 7% |
| 散文 3% | 中英文 | fineweb-edu + OpenCSG/Fineweb-Edu-Chinese | 3% |
Agent 数据不是单轮的工具调用对话,而是包含多次工具调用、真实工具返回和最终答案的完整轨迹,覆盖业务流程自动化和代码修复两类主要场景。另外 30% 留给通用推理、中文和散文,保证其他能力不受影响。
效果:在 4 种配比里,Agent 加重的 R2 在关键步骤上的损失最小,在多轮工具样本上的 KL 也最低。
三、长序列:最长 16K,覆盖 Agent 的真实长度
Agent 一次任务动辄上万 token,长上下文下的激活范围和短对话不一样,只用短样本校准,量化就照顾不到这一段。我们保留 Agent 轨迹的自然长度,单条最长 16K token。
对比:RedHat 截断到 4K,Intel AutoRound 默认 2K,bartowski 的 imatrix 按 512 切块,NVIDIA ModelOpt 默认只有 512。
四、中英双语:中文单独成类,实验证明不可少
非拉丁文字受量化的影响通常更大,而公开的校准集几乎都以英文为主。我们把中文对话和中文 Agent 数据单独成类,占 7%。
效果:对照实验中去掉中文数据(R4)后,中文 Agent 样本上的误差明显升高;其他配比都保留了中文。
五、只收做对的轨迹,数据来源也经过对照
- SWE 轨迹只取测试通过的,多轮工具数据来自经过模型评审筛选的 Nemotron-Agentic,错误示范不会进入校准集。
- 多轮工具数据源:对比了 Nemotron interactive 和 MCP 风格的 Toucan。换成 Toucan 后,多轮工具样本上的误差变大,思考长度多 8%,所以选用 Nemotron interactive。
- SWE 轨迹来源:对比了同底座生成和其他模型生成,也对比了 4 种 Agent 框架的混合轨迹。我们选用与 V2 同底座的 Qwen3.8-27B 轨迹,分布最接近。
六、严格去污染、去隐私
- 整仓排除:凡是在 SWE-bench Pro 里出现过的代码仓库,整个仓库都不进入校准集。
- 13-gram 过滤:对 SWE-bench Pro、AutomationBench、BFCL、τ²-bench、IFEval、GSM8K、MATH、MMLU-Pro、GPQA、AIME 共 10 个评测集做重叠过滤,最终命中 0 条。
- 隐私清洗:清除了轨迹里的私钥、token 和约 2,270 个邮箱地址。
- 校准与验收分离:256 条验收样本与所有校准候选都不重叠,评测结果不会因为「见过考题」而虚高。
这些选择是怎么定下来的:8 组对照实验
每一个选择都有实验依据。我们构造了 8 套校准集,用同一个量化配方(W4A16)各量化一遍,在同一套验收集上比较:
- R1–R4 比较配比:R1 是初始配比 47/35/10/8,R2 是 Agent 加重的 70/20/7/3,R3 是通用加重的 25/55/12/8,R4 去掉中文。
- S1–S3 比较数据来源:S1 换 SWE 轨迹的生成模型,S2 换成 Toucan 多轮工具数据,S3 混合 4 种 Agent 框架的轨迹。
- B0 是业界常见做法:RedHat 的 open-perfectblend,512 条 × 4K,不重新生成。
得出的结论都已体现在上面六点里,最终全系使用 R2 配比。之后又做了两轮复核:
- 端到端复核:R2 版本在 AutomationBench 和 SWE-bench Pro 上与 BF16 持平,量化误差指标上的优势没有在真实任务里反转。
- 低比特复核:GGUF 低比特档使用由同一套校准集计算的 imatrix。在 Q3_K_M 上,KL 降低 32%,关键步骤损失降低 35%。
七、三层验证:每个版本都过同一道关
| 层次 | 测什么 | 怎么测 |
|---|---|---|
| Token 级 | 量化版的输出分布离原模型有多远 | 在 256 条留出样本上,只统计模型自己生成的 47 万个 assistant token,计算 KL 散度和 top-1 一致率。工具返回的内容不是模型生成的,不计入 |
| 决策级 | Agent 在关键时刻还会不会做出同样的动作 | 从原模型做对的 50 道 AutomationBench 和 SWE-bench Pro 题目中,取出 235 个关键步骤:改变系统状态的写操作、修改代码的命令、最后的提交。比较量化版做出同一个正确动作的概率有没有下降,并检查工具调用是否一致、能否正确解析 |
| 任务级 | 真实任务的成绩 | 相同题目、相同推理配置,完整跑 AutomationBench 和 SWE-bench Pro,与 BF16 原版对比 |
各版本的 top-1 一致率见全部版本一览。决策级上,FP8 做出正确动作的概率平均只下降约 0.2%,W4A16 约 0.4%,GGUF Q8_0 约 0.01%。
任务级上,W4A16 与 BF16 在同一批题目(从公开题中分层抽取的 119 道 AutomationBench 和 24 道 SWE-bench Pro)上对比:AutomationBench 部分得分两次平均 0.785,BF16 为 0.792,差异不显著;SWE-bench Pro 两者都解决 22 道。
发布标准
vLLM 系列(FP8、INT8、NVFP4、W4A16、W4A16-G32、W4AFP8)必须全部过线才能发布:top-1 一致率不低于 95%,关键步骤上做出正确动作的概率平均下降不超过 1%,工具名一致率不低于 80%,工具调用解析失败不超过 2 次。GGUF 和 EXL3 按同一套指标逐档实测,结果都公开在上面的表里。
这道线真的会拦人:一个 W4A16 候选(AWQ + GPTQ 组合)的工具名一致率只有 79.6%,没有通过,也没有发布;最终发布的是通过检验的 GPTQ 版本。
与其他量化发布的对比
Qwen3.8-27B 在 Hugging Face 和 ModelScope 上已经有很多量化版本。下表对比各家的覆盖面、校准、验证和公开的效果数据。「效果」是各家量化版相对自己原版的保持程度,评测集各不相同;信息来自截至 2026-12-02 的公开模型卡和文档,「—」表示没有公开。
| 发布方 | 平台覆盖 | 校准数据 | 校准实验 | 质量验证 | 公开的效果 |
|---|---|---|---|---|---|
| OpenCSG(本发布) | 全平台(NVIDIA 三代 + 消费级 + Apple + 昇腾 + CPU) | 模型自己生成的 Agent 轨迹,中英双语,最长 16K | 8 组配比与来源对照 + 端到端复核 + 低比特复测 | token 级 + 235 个 Agent 关键步骤 + 端到端,逐版本公开 | **4-bit 端到端:AutomationBench 99.1%,SWE-bench Pro 100%**;FP8 top-1 97.5%,NVFP4 96.9% |
| Qwen 官方 | 仅 NVIDIA(FP8) | 未公开 | — | — | 只写「几乎一致」 |
| NVIDIA | 仅 Blackwell(NVFP4) | Nemotron 后训练数据 | — | 6 项通用 benchmark | NVFP4-QAD:Terminal-Bench 99.3% |
| RedHat AI | 仅 NVIDIA(INT4、NVFP4) | 通用指令集 open-perfectblend,4K | — | 6 项通用 benchmark | NVFP4:SWE-Bench 99.0% |
| Unsloth | NVIDIA + 消费级 + CPU | 自建 imatrix,配比未公开 | — | KLD、top-1,多为图表 | NVFP4:中文 top-1 93.6% |
| bartowski | 消费级 + CPU(GGUF) | 散文 + 工具调用对话 | imatrix 语料对比 | wiki 文本上的 PPL、KLD | 无 Agent 任务数据 |
| mlx-community | 仅 Apple | 基础版不校准 | — | 多数没有 | — |
| Intel AutoRound | NVIDIA + Intel CPU / XPU | 通用文本 pile-10k | — | MMLU 等通用题库 | — |
| Eco-Tech | 仅昇腾 | 未公开 | — | 仅 GPQA | W8A8:GPQA 99.4% |
我们的不同之处:
- 全平台覆盖,一家配齐。 在检索到的发布方中,没有第二家同时提供 NVIDIA 数据中心(FP8 / INT8 / W4A16 / W4AFP8)、Blackwell(NVFP4)、消费级(GGUF / EXL3)、Apple(MLX)和昇腾(W8A8)版本。所有版本来自同一个 BF16,需要校准的版本共用同一套 Agent 校准集,并在同一套留出集上验收。
- 4-bit 的 Agent 任务成绩与原版持平。 其他家公开的多是通用题库的恢复率;我们直接在 AutomationBench 和 SWE-bench Pro 这两个 Agent 任务上对比,4-bit 版本分别保持了原版的 99.1% 和 100%。
- 用被量化的模型自己生成校准数据。 在公开说明了校准数据的发布方中,其他家用的都是公开或第三方数据,只有我们用被量化模型自己重新生成回复。对照实验显示,换成通用校准集后,W4A16 在 Agent 关键步骤上的损失翻倍。
- 校准方案由充分的对照实验选出。 8 套校准集在同一套验收集上逐一比较,再用端到端任务和低比特量化复核,实验设计和结论都公开在上文。其他发布方基本没有公开校准方案的对照实验。
- 验收深入到 Agent 的每一个关键决策。 业界常用 PPL、KLD 和通用题库;我们额外测量 235 个真实 Agent 关键步骤上的动作保真度,在检索到的发布方中没有第二家这样做。
来源:Qwen/Qwen3.8-27B-FP8、nvidia/Qwen3.8-27B-NVFP4、RedHatAI/Qwen3.8-27B-INT4、Unsloth Qwen3.8 文档、bartowski/Qwen3.8-27B-GGUF、mlx-community、Intel AutoRound、vLLM-Ascend Qwen3.8-27B 教程、bartowski imatrix v6、nvidia/Qwen3.8-27B-NVFP4-QAD、RedHatAI/Qwen3.8-27B-NVFP4。
使用协议
使用本模型需要遵循 OpenCSG 模型与数据集许可协议。仓库 metadata 中的 license: other 表示本模型采用平台预设列表之外的许可协议,实际许可条款以该协议为准。
本模型可按 OpenCSG 模型与数据集许可协议申请商业用途。若计划将本模型,或基于本模型训练、增强的模型、系统、Agent、API 服务和商业产品用于商业场景,请发送邮件至 lorraineg@opencsg.com 获取许可。
This repo: MLX-6bit
| Item | Value |
|---|---|
| Quantization | MLX 6-bit |
| Hardware | Apple Silicon Macs (M1–M5) |
| Engine | mlx-lm / mlx-vlm / LM Studio |
| Weights | 22.8 GB |
| Est. memory (32K / 128K context) | 24 GB / 30 GB |
hf download opencsg/Agentic-27B-V2-MLX-6bit
python -m mlx_vlm generate --model Agentic-27B-V2-MLX-6bit --prompt "你好"
Not sure which build to use? Run python select_quant.py --lang en from this repo on the target machine; it lists every build that fits the hardware. The full description of the quantized series follows.
Agentic-27B-V2 is now available in quantized builds for every hardware tier. This release ships 14 repositories with 21 ready-to-run variants, covering:
- NVIDIA: three generations of data center GPUs (Ampere, Hopper, Blackwell) and RTX 30/40/50 consumer cards
- Huawei Ascend: Atlas A2 / A3 (910B, 910C)
- Apple Silicon: every Mac from M1 to M5
- The llama.cpp ecosystem: Ollama and LM Studio, plus AMD / Intel GPUs and CPU-only machines
The 8-bit builds run a 32K context on a single 48GB GPU. The smallest build (IQ2_M) is only 10.8GB. All builds are live on ModelScope, the OpenCSG community and Hugging Face:
ModelScope collection · OpenCSG collection · Hugging Face collection
Quick start
On the machine you plan to deploy on, run select_quant.py from the repository. It needs only Python, with no extra dependencies (add --lang en for English output):
python select_quant.py
The script reads the machine's total capacity (GPU memory or unified memory) and lists every variant that fits, with the memory each one needs and a recommendation per inference engine. Enter a number to pick a variant, then choose "download" or "deploy". The script prints the commands and runs them when you press Enter. A deployment ends with an OpenAI-compatible server (port 8000 by default). Example on a single RTX 4090:
Detected hardware: NVIDIA GeForce RTX 4090 × 1, 24 GB, compute capability 8.9
Budgeted against total capacity, context 32,768 tokens
# Variant Weights Est. memory Engine Top-1 agreement
1 EXL3-3.0bpw 13.5 GB 15.6 GB ExLlamaV3 / TabbyAPI 95.9% ← recommended
2 EXL3-2.5bpw 12.0 GB 14.2 GB ExLlamaV3 / TabbyAPI 93.8%
3 GGUF Q5_K_M 19.8 GB 21.5 GB llama.cpp / Ollama / LM Studio 98.4% ← recommended
4 GGUF Q4_K_M 17.2 GB 19.1 GB llama.cpp / Ollama / LM Studio 97.3%
5 GGUF IQ4_XS 15.8 GB 17.8 GB llama.cpp / Ollama / LM Studio 97.0%
6 GGUF Q3_K_M 14.0 GB 16.1 GB llama.cpp / Ollama / LM Studio 94.5%
7 GGUF IQ3_XXS 11.9 GB 14.2 GB llama.cpp / Ollama / LM Studio 93.0%
8 GGUF IQ2_M 10.8 GB 13.1 GB llama.cpp / Ollama / LM Studio 90.3%
6 more variants exceed the capacity and are hidden (use --all).
Pick a variant by number [default 1]: 4
What next?
1) Download the model
2) Deploy the model (download and start an OpenAI-compatible server)
Choose [default 1]: 2
csghub-cli download OpenCSG/Agentic-27B-V2-GGUF Agentic-27B-V2-Q4_K_M.gguf --local-dir Agentic-27B-V2-GGUF
llama-server -m ./Agentic-27B-V2-GGUF/Agentic-27B-V2-Q4_K_M.gguf \
-c 32768 --jinja -ngl 99 --port 8000
Run it for you now?
1) Run
2) No, I'll do it myself
Choose [default 1]:
Running...
If you don't have the machine yet, specify the hardware by hand, for example python select_quant.py --device apple --mem 36. For a 128K context, add --ctx 131072.
You can also deploy manually:
# vLLM: FP8 / INT8 / NVFP4 / W4A16 / W4AFP8
vllm serve ./Agentic-27B-V2-FP8 --max-model-len 32768 --trust-remote-code \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_xml \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'
# llama.cpp: GGUF (Ollama and LM Studio can load the GGUF file directly)
llama-server -m Agentic-27B-V2-Q4_K_M.gguf --mmproj mmproj-Agentic-27B-V2-F16.gguf \
-c 65536 --jinja -ngl 99
On Ascend, use vLLM-Ascend with the same arguments as vLLM. With enough memory, --max-model-len can go up to 262144.
Why agent models need quantization more, and are more sensitive to its errors
Tool outputs are private data, so the model must run locally on limited hardware
A chat model reads a sentence the user wrote. An agent model reads what tools return: local files, emails, database queries, code repositories, API responses from internal systems. This content belongs to the user and the company, not to the model. Often it is not allowed to leave the machine or the internal network.
That is why agent models are often deployed privately and on-premises. Whether you can deploy one depends first on whether the model fits:
- The original BF16 model needs at least one 80GB data center GPU.
- Most developers have a 16–32GB GPU or a Mac.
- Most enterprise server rooms run cards like A100 / A800, H20, L40S and Ascend 910B.
Quantization decides how many machines the model can run on.
One task means dozens to hundreds of calls, and errors compound
To finish one task, an agent makes dozens to hundreds of decisions in a row. On AutomationBench, V2 makes about 40 tool calls per task and reads about 400K tokens in total. On SWE-bench Pro, it generates about 35K tokens per task on average.
One wrong step wastes everything after it, such as calling the wrong API, passing a wrong argument or editing the wrong line of code:
| Per-step accuracy | 20 steps all correct | 50 steps all correct | 100 steps all correct |
|---|---|---|---|
| 99.9% | 98.0% | 95.1% | 90.5% |
| 99.5% | 90.5% | 77.8% | 60.6% |
| 99.0% | 81.8% | 60.5% | 36.6% |
A per-step deviation of a few tenths of a percent barely shows in PPL. Over dozens of steps, it clearly lowers the task success rate. So quantizing an agent model cannot rely on PPL and general benchmarks alone. The question that matters is whether the model still takes the same action as the original at key decision points. Calibration and acceptance testing in this release are built around that question. The final 4-bit build matches BF16 on end-to-end tasks.
All variants
| Variant | Quantization | Hardware | Inference engine | Weights | Est. memory 32K / 128K |
Quality top-1 agreement |
|---|---|---|---|---|---|---|
| BF16 (original) | — | 80GB data center GPU | vLLM / SGLang | 55.6 GB | 62 / 69 GB | 100% |
| FP8 | FP8 block 128 | Hopper, Blackwell, Ada | vLLM / SGLang | 31.3 GB | 37 / 44 GB | 97.5% |
| NVFP4 | NVFP4 W4A4, GPTQ | Blackwell | vLLM | 20.6 GB | 26 / 33 GB | 96.9% |
| W4A16-G32 | INT4 weights, GPTQ, group 32 | Ampere and newer | vLLM / SGLang | 20.6 GB | 26 / 33 GB | 96.9% |
| INT8 | W8A8, SmoothQuant + GPTQ | Ampere and newer | vLLM | 31.3 GB | 37 / 44 GB | 96.5% |
| W4A16 | INT4 weights, GPTQ, group 128 | Ampere and newer | vLLM / SGLang | 19.5 GB | 25 / 32 GB | 96.4% |
| W4AFP8 | INT4 weights + FP8 activations | Hopper | vLLM | 19.5 GB | 25 / 32 GB | 95.8% |
| EXL3-3.0bpw | EXL3 (QTIP) | Single Ampere or newer GPU | ExLlamaV3 / TabbyAPI | 13.5 GB | 16 / 22 GB | 95.9% |
| EXL3-2.5bpw | EXL3 (QTIP) | Single Ampere or newer GPU | ExLlamaV3 / TabbyAPI | 12.0 GB | 14 / 20 GB | 93.8% |
| Ascend-W8A8 | msModelSlim W8A8 | Ascend Atlas A2 / A3 | vLLM-Ascend | 32.1 GB | 39 / 45 GB | — |
| MLX-8bit | MLX 8-bit | Apple Silicon | mlx-lm / mlx-vlm / LM Studio | 29.5 GB | 31 / 37 GB | — |
| MLX-6bit | MLX 6-bit | Apple Silicon | Same as above | 22.8 GB | 24 / 30 GB | — |
| MLX-4bit | MLX 4-bit, group 64 | Apple Silicon | Same as above | 16.1 GB | 18 / 24 GB | — |
| MLX-MXFP4 | MXFP4 | Apple Silicon | Same as above | 15.2 GB | 17 / 23 GB | — |
The 8 GGUF quants live in a single repository, Agentic-27B-V2-GGUF, together with the vision projector mmproj (0.93GB):
| Quant | File size | Est. memory 32K / 128K | top-1 agreement | Best for |
|---|---|---|---|---|
| Q8_0 | 29.0 GB | 30 / 36 GB | 99.3% | 32GB GPUs, Macs with 48GB or more |
| Q6_K | 22.5 GB | 24 / 30 GB | 98.8% | 32GB GPUs, Macs with 36GB or more |
| Q5_K_M | 19.8 GB | 22 / 28 GB | 98.4% | 24GB GPUs |
| Q4_K_M | 17.2 GB | 19 / 25 GB | 97.3% | First choice for 24GB GPUs and 32GB Macs |
| IQ4_XS | 15.8 GB | 18 / 24 GB | 97.0% | 24GB GPUs that need a longer context |
| Q3_K_M | 14.0 GB | 16 / 22 GB | 94.5% | 16GB GPUs (shorter context) |
| IQ3_XXS | 11.9 GB | 14 / 20 GB | 93.0% | 16GB GPUs, 24GB Macs |
| IQ2_M | 10.8 GB | 13 / 19 GB | 90.3% | 16GB GPUs, lowest entry point (12GB GPUs need the context cut to about 8K) |
Quantized vs. original: up to 80% less memory, no loss in capability
Hardware requirement: from one 80GB GPU down to one 16GB GPU. Estimates at 32K context:
| Variant | Memory | Runs on |
|---|---|---|
| BF16 original | ~62GB | One 80GB data center GPU |
| FP8 | ~37GB | 48GB cards such as L40S and RTX 6000 Ada |
| 4-bit | ~25GB | RTX 5090 with vLLM |
| GGUF Q4_K_M | ~19GB | 24GB consumer GPUs, 32GB Macs |
| IQ2_M | ~13GB | 16GB GPUs |
More room for context and concurrency on the same card. On a single H20 (96GB):
- After loading weights, BF16 leaves only about 28GB for the KV cache. FP8 leaves about 52GB and W4A16 about 64GB.
- V2 needs only 64MB of KV cache per 1K tokens. The extra ~36GB that W4A16 frees up over BF16 supports about 550K more tokens of concurrent context.
Faster low-precision compute. FP8, NVFP4 and INT8 run directly on the hardware's native low-precision tensor cores. The 4-bit weight-only builds mainly save memory bandwidth during decoding. Public research on Qwen3.8-27B, the same base model (Minima, arXiv:2609.04098), measured NVFP4 decoding 1.86x faster than BF16.
No loss in capability. FP8 reaches 97.5% top-1 agreement with the original, and GGUF Q5_K_M and above reach 98.4%–99.3%. The 4-bit W4A16 build matches BF16 end to end on AutomationBench and SWE-bench Pro. See Quality.
Every hardware tier: from the server room to the laptop
We did not just pick one or two popular formats. We first surveyed the hardware developers and companies actually use, then chose the best native format for each class:
| Hardware class | Typical devices | Our variants | Why |
|---|---|---|---|
| Hopper data center GPUs | H100, H200, H20, H800 | FP8, W4AFP8, W4A16 | Hopper has native FP8 Tensor Cores. Our FP8 layout matches Qwen's official FP8. W4AFP8 targets large-batch, high-concurrency serving |
| Blackwell | B200, B300, RTX 50, RTX PRO 6000 | NVFP4 | Blackwell supports FP4 natively, at two-thirds the size of FP8 |
| Ampere / Ada | A100, A800, A10, L40S, RTX 30/40 | INT8, W4A16, W4A16-G32 | Ampere has no FP8 Tensor Cores, so FP8 only saves memory there and gives no speedup. INT8 W8A8 is what actually accelerates it. A800 / A100 are widely used in private deployments in China |
| Huawei Ascend | Atlas A2 / A3 (910B, 910C) | Ascend-W8A8 | Uses the official msModelSlim W8A8 recipe and deploys directly with vLLM-Ascend |
| Consumer GPUs | RTX 3060–5090, RX 7900 | GGUF ×8, EXL3 ×2 | 10 sizes from 10.8GB to 29GB. Every card from 16GB to 32GB has a variant that fits fully in GPU memory |
| Apple Silicon | M1–M5 MacBook, Mac mini, Mac Studio | MLX ×4, GGUF | MLX is the native Mac framework. GGUF runs in one click in Ollama and LM Studio |
| CPUs, other GPUs | x86 / ARM servers, AMD / Intel GPUs | GGUF | llama.cpp supports CUDA, ROCm, Vulkan, Metal and CPU-only |
This lineup covers the mainstream hardware developers actually use for local models:
- Hugging Face hardware census (2026, about 300K self-reported users): the four main classes are NVIDIA 47%, CPU 26%, Apple Silicon 18% and AMD 8%, 99% in total. Each class has a matching variant.
- The GPUs most used for local AI in the census, RTX 3090, 5090, 4090, 5070 Ti and 5060 Ti, can all fit at least one variant fully in GPU memory. The 12GB RTX 3060 can run IQ2_M with about 8K of context.
- Data centers in China: according to IDC, NVIDIA took 34% and Huawei Ascend 28% of AI accelerator shipments in China in the first half of 2026. We ship native builds for both platforms.
Sources: Hugging Face Hardware, Hardware setups on HF (2026-05), IDC China AI accelerator share, H1 2026 (via TechNode, 2026-10).
Quality: agent capability survives quantization
The first question about any quantized build is whether it loses capability. Our results:
| Compared with the original | |
|---|---|
| 4-bit (W4A16) end-to-end tasks | Retains 99.1% on AutomationBench and 100% on SWE-bench Pro |
| FP8 | 97.5% top-1 agreement. The probability of the correct action at key agent steps drops by only about 0.2% |
| GGUF Q5_K_M and above | 98.4%–99.3% top-1 agreement, essentially lossless |
| All vLLM variants | Every one passed the same agent quality gate before release |
We got there through the following calibration and validation choices:
- Responses generated by the model itself: quantization sees how the model actually behaves in deployment. Loss at key agent steps is half that of the common approach.
- 70% full agent trajectories: multiple tool calls, real tool outputs and the final answer.
- Long sequences: up to 16K per sample, matching real agent lengths.
- Chinese and English: Chinese is its own category.
- Only successful trajectories: every data source was tested in a controlled comparison.
- Strict decontamination and privacy scrubbing: 0 overlap hits across 10 benchmarks.
- Three levels of validation: token level, 235 key agent steps and end-to-end tasks, published per variant.
Every choice was backed by controlled experiments: 8 calibration sets, about 37 quantization runs and about 32 rounds of quality evaluation. Details follow.
What we built on
- First-party vendors: NVIDIA quantized Nemotron with its own post-training data, not generic text. Google Gemma and Meta Llama quantized builds also follow their own post-training distributions.
- Community and tooling vendors: RedHat uses the generic instruction set open-perfectblend (512 samples × 4K, our baseline B0 in the experiments). Unsloth stresses that instruct models must use the chat template and that calibration and evaluation sets must be kept separate. bartowski measured on Q2_K that switching calibration corpora can move the BFCL tool-calling score by about 10 points. Intel AutoRound has started to offer an agent-specific calibration set.
- Academic research: COLA, FAQ, Self-calibration and other work found that the source of calibration data can matter more than the choice of quantization method, and that calibration data generated by the model itself works better. In-domain calibration brought INT3 reasoning accuracy back from 28% to 65%.
The conclusion is clear: calibrate with data generated by the model itself, from the same kind of tasks it will run.
1. Responses generated by the model itself: half the loss at key agent steps
Quantization algorithms decide how to round each layer from the activations the calibration data produces. If another model wrote the calibration data, the activations seen during quantization differ from what the model produces in deployment.
- Single-turn data: we submitted about 3,300 prompts, regenerated every response with Agentic-27B-V2 BF16 and kept 3,141 complete, parseable results.
- Multi-turn tool trajectories: real tool outputs are kept, and the final turn is generated by V2.
- SWE code trajectories: taken from trajectories generated by Qwen3.8-27B, the same base model as V2.
- Rendering: everything is rendered with V2's own chat template, including tool definitions, thinking and
qwen3_xmltool calls, exactly as in deployment.
Result: with the same W4A16 recipe, switching to the industry-standard calibration set (B0) doubles the loss at key agent steps, raises token-level KL by 40% and lengthens thinking.
2. 70% full agent trajectories: the agent-heavy mix works best
| Category | Subcategory | Source | Share |
|---|---|---|---|
| Agents and tools 70% | Multi-turn tool use (business workflows) | nvidia/Nemotron-Agentic-v1 · interactive_agent | ~30% |
| SWE coding agents | nvidia/Open-SWE-Traces · subset generated by Qwen3.8-27B, the same base model (mini-swe-agent + OpenHands) | ~22% | |
| Single-step / multi-step tool calls | Nemotron-Agentic-v1 · tool_calling | ~18% | |
| General reasoning 20% | Chat, code | ultrachat, ultrafeedback, lmsys-arena, AutoIF, evol-codealpaca, UltraInteract from open-perfectblend | ~13% |
| Math, STEM | Nemotron-Post-Training-v1 · math / stem | ~7% | |
| Chinese 7% | Chinese chat, Chinese agents | OpenCSG/smoltalk_chinese and others | 7% |
| Prose 3% | Chinese and English | fineweb-edu + OpenCSG/Fineweb-Edu-Chinese | 3% |
The agent data is not single-turn tool-call chat. It consists of full trajectories with multiple tool calls, real tool outputs and final answers, covering the two main scenarios: business workflow automation and code repair. The remaining 30% goes to general reasoning, Chinese and prose to protect other capabilities.
Result: among 4 mixes, the agent-heavy R2 had the lowest loss at key steps and the lowest KL on multi-turn tool samples.
3. Long sequences: up to 16K, matching real agent lengths
A single agent task easily runs past 10K tokens. Activation ranges at long context differ from short chats, so calibrating only on short samples leaves that range uncovered. We keep agent trajectories at their natural length, up to 16K tokens per sample.
For comparison: RedHat truncates to 4K, Intel AutoRound defaults to 2K, bartowski's imatrix uses 512-token chunks and NVIDIA ModelOpt defaults to just 512.
4. Chinese and English: Chinese as its own category, proven necessary
Non-Latin scripts usually suffer more from quantization, yet public calibration sets are almost all English. We put Chinese chat and Chinese agent data in their own category, at 7%.
Result: in the controlled experiment, removing Chinese data (R4) clearly raised the error on Chinese agent samples. Every other mix kept Chinese.
5. Only successful trajectories, with every data source tested
- SWE trajectories are limited to those that passed tests. Multi-turn tool data comes from Nemotron-Agentic, filtered by model review. Wrong demonstrations never reach the calibration set.
- Multi-turn tool data source: we compared Nemotron interactive with the MCP-style Toucan. Switching to Toucan raised the error on multi-turn tool samples and lengthened thinking by 8%, so we chose Nemotron interactive.
- SWE trajectory source: we compared same-base-model trajectories with those from other models, and a mix of trajectories from 4 agent frameworks. We chose trajectories from Qwen3.8-27B, the same base model as V2, whose distribution is closest.
6. Strict decontamination and privacy scrubbing
- Whole-repository exclusion: any code repository that appears in SWE-bench Pro is excluded from the calibration set entirely.
- 13-gram filtering: overlap filtering against 10 benchmarks (SWE-bench Pro, AutomationBench, BFCL, τ²-bench, IFEval, GSM8K, MATH, MMLU-Pro, GPQA, AIME) leaves 0 hits.
- Privacy scrubbing: private keys, tokens and about 2,270 email addresses were removed from trajectories.
- Calibration and evaluation kept separate: the 256 evaluation samples do not overlap with any calibration candidate, so results are not inflated by "seeing the test".
How we made these choices: 8 controlled experiments
Every choice is backed by experiments. We built 8 calibration sets, quantized each with the same recipe (W4A16) and compared them on the same evaluation set:
- R1–R4 compare mixes: R1 is the initial 47/35/10/8 mix, R2 is the agent-heavy 70/20/7/3, R3 is the general-heavy 25/55/12/8, and R4 drops Chinese.
- S1–S3 compare data sources: S1 changes the model that generated the SWE trajectories, S2 switches to Toucan multi-turn tool data, and S3 mixes trajectories from 4 agent frameworks.
- B0 is the common industry approach: RedHat's open-perfectblend, 512 samples × 4K, no regeneration.
The conclusions are reflected in the six points above, and the whole lineup uses the R2 mix. We then ran two more checks:
- End-to-end check: the R2 build matches BF16 on AutomationBench and SWE-bench Pro. Its advantage on quantization error metrics did not reverse on real tasks.
- Low-bit check: the low-bit GGUF quants use an imatrix computed from the same calibration set. On Q3_K_M, KL drops by 32% and key-step loss by 35%.
7. Three levels of validation: every variant passes the same gate
| Level | What it measures | How |
|---|---|---|
| Token level | How far the quantized output distribution is from the original | On 256 held-out samples, we compute KL divergence and top-1 agreement over only the 470K assistant tokens the model generated itself. Tool outputs are not generated by the model and are excluded |
| Decision level | Whether the agent still takes the same action at key moments | From 50 AutomationBench and SWE-bench Pro tasks the original model solved, we take 235 key steps: write operations that change system state, commands that modify code and the final submission. We check whether the probability of the quantized model taking the same correct action drops, and whether tool calls match and parse correctly |
| Task level | Scores on real tasks | Same tasks, same inference settings, full runs of AutomationBench and SWE-bench Pro, compared with the BF16 original |
Top-1 agreement for each variant is listed in All variants. At the decision level, the probability of the correct action drops by about 0.2% on average for FP8, about 0.4% for W4A16 and about 0.01% for GGUF Q8_0.
At the task level, W4A16 and BF16 were compared on the same tasks (119 AutomationBench and 24 SWE-bench Pro tasks, stratified samples from the public sets). On AutomationBench, W4A16 averaged a partial score of 0.785 over two runs vs. 0.792 for BF16, a difference that is not significant. On SWE-bench Pro, both solved 22 tasks.
Release criteria
Every vLLM variant (FP8, INT8, NVFP4, W4A16, W4A16-G32, W4AFP8) must pass all thresholds before release: top-1 agreement of at least 95%, an average drop of no more than 1% in the probability of the correct action at key steps, tool name agreement of at least 80%, and no more than 2 tool call parse failures. GGUF and EXL3 quants are measured against the same metrics, and all results are published in the tables above.
The gate does reject builds. One W4A16 candidate (AWQ + GPTQ combined) reached only 79.6% tool name agreement. It failed and was not released. The released build is the GPTQ version that passed.
Comparison with other quantized releases
Qwen3.8-27B already has many quantized builds on Hugging Face and ModelScope. The table below compares coverage, calibration, validation and published quality data across publishers. "Quality" is how much of its own original each quantized build retains, measured on different benchmarks. Information comes from public model cards and documentation as of 2026-12-02. "—" means not published.
| Publisher | Platform coverage | Calibration data | Calibration experiments | Quality validation | Published quality |
|---|---|---|---|---|---|
| OpenCSG (this release) | Every platform (three NVIDIA generations + consumer + Apple + Ascend + CPU) | Agent trajectories generated by the model itself, Chinese and English, up to 16K | 8 controlled mix and source experiments + end-to-end check + low-bit retest | Token level + 235 key agent steps + end-to-end, published per variant | 4-bit end-to-end: AutomationBench 99.1%, SWE-bench Pro 100%; FP8 top-1 97.5%, NVFP4 96.9% |
| Qwen (official) | NVIDIA only (FP8) | Not published | — | — | Only states "nearly identical" |
| NVIDIA | Blackwell only (NVFP4) | Nemotron post-training data | — | 6 general benchmarks | NVFP4-QAD: Terminal-Bench 99.3% |
| RedHat AI | NVIDIA only (INT4, NVFP4) | Generic instruction set open-perfectblend, 4K | — | 6 general benchmarks | NVFP4: SWE-Bench 99.0% |
| Unsloth | NVIDIA + consumer + CPU | In-house imatrix, mix not published | — | KLD, top-1, mostly as charts | NVFP4: Chinese top-1 93.6% |
| bartowski | Consumer + CPU (GGUF) | Prose + tool-calling chat | imatrix corpus comparison | PPL, KLD on wiki text | No agent task data |
| mlx-community | Apple only | No calibration for base builds | — | Mostly none | — |
| Intel AutoRound | NVIDIA + Intel CPU / XPU | Generic text pile-10k | — | General benchmarks such as MMLU | — |
| Eco-Tech | Ascend only | Not published | — | GPQA only | W8A8: GPQA 99.4% |
What sets us apart:
- Every platform, from one publisher. No other publisher we found offers NVIDIA data center (FP8 / INT8 / W4A16 / W4AFP8), Blackwell (NVFP4), consumer (GGUF / EXL3), Apple (MLX) and Ascend (W8A8) builds together. Every variant comes from the same BF16 model. Variants that need calibration share the same agent calibration set and are evaluated on the same held-out set.
- 4-bit matches the original on agent tasks. Other publishers mostly report recovery on general benchmarks. We compare directly on two agent benchmarks, AutomationBench and SWE-bench Pro, where the 4-bit build retains 99.1% and 100% of the original.
- Calibration data generated by the quantized model itself. Among publishers that describe their calibration data, all others use public or third-party data. Only we regenerate responses with the model being quantized. Controlled experiments show that switching to a generic calibration set doubles W4A16's loss at key agent steps.
- A calibration recipe chosen by thorough controlled experiments. 8 calibration sets were compared one by one on the same evaluation set, then checked with end-to-end tasks and low-bit quantization. The experiment design and conclusions are published above. Other publishers have published almost no controlled experiments on their calibration recipes.
- Acceptance testing down to every key agent decision. The industry typically uses PPL, KLD and general benchmarks. We also measure action fidelity at 235 real key agent steps. No other publisher we found does this.
Sources: Qwen/Qwen3.8-27B-FP8, nvidia/Qwen3.8-27B-NVFP4, RedHatAI/Qwen3.8-27B-INT4, Unsloth Qwen3.8 docs, bartowski/Qwen3.8-27B-GGUF, mlx-community, Intel AutoRound, vLLM-Ascend Qwen3.8-27B tutorial, bartowski imatrix v6, nvidia/Qwen3.8-27B-NVFP4-QAD, RedHatAI/Qwen3.8-27B-NVFP4.
License
Use of this model is governed by the OpenCSG Model and Dataset License Agreement. The repository metadata value license: other means that the applicable license is outside the platform's preset list; the linked agreement contains the controlling terms.
Commercial use can be requested under the OpenCSG Model and Dataset License Agreement. If you plan to use this model, or any model, system, agent, API service or commercial product trained on or enhanced by it, in a commercial setting, email lorraineg@opencsg.com to obtain a license.
- Downloads last month
- 80
6-bit