ISTA发布DeepSeek-V4.1-Flash编码模型:GSQ+RCO压缩
[Release] ISTA DeepSeek-V4.1-Flash-1017 GSQ-RCO Coder: a 763B model at 1 bit per parameter
本地部署者必看,展示了如何用GSQ和RCO把763B大模型压到单卡能跑的级别,且代码能力损失极小,直接参考配置和链接。
We have released a Coder build of DeepSeek-V4.1-Flash-1017, compressed with GSQ and RCO, in which half of the model's routed experts have been removed.
我们发布了 DeepSeek-V4.1-Flash-1017 的 Coder 构建版本,该版本使用 GSQ 和 RCO 进行压缩,其中移除了模型一半的路由专家。
DeepSeek-V4.1-Flash-1017 is a sparse mixture-of-experts model: 384 routed experts per layer, of which 6 are active per token, 763.2B parameters, 551.9B of them in the transformer.
DeepSeek-V4.1-Flash-1017 是一个稀疏混合专家(MoE)模型:每层 384 个路由专家,每个 token 激活 6 个,共 7632 亿参数,其中 5519 亿位于 Transformer 部分。
What's inside
内部结构
- One expert-pruned GGUF: 192 of 384 experts kept in every layer, 72.1 GB of transformer weights, against 138.2 GB for our unpruned IQ2_XXS build.
- 1 bit per parameter, counted against the original model: 72.12 GB divided by the original 551.9B transformer parameters gives 1.05 bits, which we round to 1. The removed experts count as zero bits. No individual weight is stored below 1 bit: the 280.1B parameters the Coder keeps average 2.06 bits.
- The shared Engram file (110.6 GB) and vision projector are the same files as in the unpruned release, so they need to be downloaded only once.
- GSQ (Gumbel-Softmax Quantization): post-training scalar quantization that jointly learns grid assignments and group scales, closing most of the gap between scalar and vector quantization at low bit-widths while remaining deployable in standard GGUF types.
- RCO (Riemannian Constrained Optimization): enforces exact budgets by gradient descent on the task loss, without per-constraint tuning. Here it selects which experts to keep, optimising the KL divergence to the unpruned model, under one exact budget per layer.
- 一种经过专家剪枝的 GGUF 格式:每层保留 384 个专家中的 192 个,Transformer 权重为 72.1 GB,相比之下我们未剪枝的 IQ2_XXS 构建版本为 138.2 GB。
- 每个参数 1 位,按原始模型计算:72.12 GB 除以原始 5519 亿的 Transformer 参数得到 1.05 位,我们将其舍入为 1 位。被移除的专家计为零位。没有任何单个权重的存储低于 1 位:Coder 保留的 2801 亿参数平均为 2.06 位。
- 共享的 Engram 文件(110.6 GB)和视觉投影器与未剪枝发布版中的文件相同,因此只需下载一次。
- GSQ(Gumbel-Softmax 量化):一种后训练标量量化方法,联合学习网格分配和组缩放因子,在低位宽下缩小了标量量化与向量量化之间的差距,同时保持可部署于标准 GGUF 类型中。
- RCO(黎曼约束优化):通过对任务损失进行梯度下降来强制执行精确预算,无需针对每个约束进行调整。在此处,它选择保留哪些专家,以最小化与未剪枝模型的 KL 散度,并在每层应用一个精确预算约束。
Why one budget per layer
为何每层一个预算
GGUF stores a single expert count for the whole model, so every layer must keep exactly the same number of experts; uneven layers would need padding that gives back the memory pruning saved. RCO treats each layer's budget as a hard constraint and holds all of them exactly at every optimisation step, while the layers are still optimised jointly through one loss on the full model. A penalty formulation would only meet the budgets approximately and would need one tuned coefficient per layer.
GGUF 为整个模型存储单一的专家数量,因此每层必须保留完全相同数量的专家;不均衡的层需要填充,这将抵消内存剪枝所节省的空间。RCO 将每层的预算视为硬约束,并在每次优化步骤中严格保持所有约束,而各层仍通过整个模型上的单一损失函数进行联合优化。如果使用惩罚公式,则只能近似满足预算,并且需要为每层调整一个系数。
Results
结果
- LiveCodeBench v6: 88.57 against 89.71 for the base model, retaining 98.7%
- SWE-bench Verified: 77.00 against 81.20, retaining 94.8%
- LiveCodeBench v6:得分为 88.57,基础模型为 89.71,保留了 98.7%
- SWE-bench Verified:得分为 77.00,对比值为 81.20,保留了 94.8%
SWE-bench Verified runs long agentic trajectories over real repositories, and tolerates the capacity reduction less well than single-problem code generation, as expected when errors accumulate across turns.
SWE-bench Verified 在实际代码库上运行较长的智能体轨迹,由于错误在多轮交互中累积,其对容量降低的容忍度不如单问题代码生成,这符合预期。
Real-world examples, each a single HTML file written by the Coder: an animated SVG of a pelican riding a bicycle, a three.js voxel pagoda garden, and a playable first-person voxel sandbox. For full post incl. videos see: https://x.com/mhelcig/status/2117257900863156518
真实世界示例,每个均为 Coder 编写的单个 HTML 文件:一只骑自行鹈鹕的动画 SVG、一个 three.js 体素宝塔花园,以及一个可玩的第一人称体素沙盒。包含视频的完整帖子见:https://x.com/mhelcig/status/2117257900863156518
Links
链接
- Coder (expert-pruned): https://huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-Coder-GGUF
- Quantized models (unpruned): https://huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF
- GSQ: paper https://arxiv.org/abs/2604.18556 | code https://github.com/IST-DASLab/GSQ
- RCO: paper https://arxiv.org/abs/2605.00649 | code https://github.com/IST-DASLab/RCO
- Coder(专家剪枝版):https://huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-Coder-GGUF
- 量化模型(未剪枝):https://huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF
- GSQ:论文 https://arxiv.org/abs/2604.18556 | 代码 https://github.com/IST-DASLab/GSQ
- RCO:论文 https://arxiv.org/abs/2605.00649 | 代码 https://github.com/IST-DASLab/RCO
The repository ships the complete per-tensor RCO allocation. The GGUF runs in llama.cpp b11870 or newer and in Strata.
该仓库提供了完整的逐张量 RCO 分配方案。GGUF 格式可在 llama.cpp b11870 或更高版本以及 Strata 中运行。
The Coder build is an experimental release and feedback is welcome, particularly on capabilities that were not represented in the calibration mixture. Requests for models to quantize or prune are also welcome.
Coder 构建是一个实验性版本,欢迎提供反馈,特别是关于校准混合数据中未体现的能力方面的反馈。也欢迎提出需要量化或剪枝的模型请求。
From the ISTA Deep Algorithms and Systems Lab.
来自 ISTA 深度算法与系统实验室。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力