kali20gakki/msAgent / skills/quantizer/quantization-expert-experience-tuning-rules
quantization-expert-experience-tuning-rules
Verified量化专家经验调优库:按「L1 通用专家调优意见 → L2 结构化专家调优意见 → L3 模型专属专家调优意见」三级递进, 输出量化精度调优的完整手段(离群值抑制 / 量化方法·粒度·对称性选型 / 校准集调整 / 敏感层回退 / 模型专属策略), 每条结论附专家原因分析与专家意见可信度等级。 本 Skill 是专家经验库,负责说明可选离群值抑制算法并询问用户选择哪些算法,以及回答「怎么调、哪些层需要回退及为什么」;不运行离群值抑制 processor,不修改 YAML、不执行量化、不做 EP 检查 / 服务化 / 任务评测。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.8 KB |
| cross-model-pitfalls.md | markdown | 8.3 KB |
| models/README.md | markdown | 1.3 KB |
| models/deepseek/deepseek-v3.md | markdown | 2.9 KB |
| models/deepseek/deepseek-v4.md | markdown | 2.5 KB |
| models/glm/glm-4-moe.md | markdown | 1.3 KB |
| models/glm/glm-5.md | markdown | 1.4 KB |
| models/minimax/minimax-m.md | markdown | 1.6 KB |
| scripts/README.md | markdown | 3.1 KB |
| scripts/apply_rollback.py | script | 10.1 KB |
| scripts/inspect_model_structure.py | script | 7.1 KB |
| scripts/yaml_utils.py | script | 4.2 KB |
| structure-family-pitfalls.md | markdown | 14.2 KB |
models/glm/glm-5.md
View on GitHub# GLM-5.1 专属经验
> 层级:L3。结构模型类背景同 L2「MoE」「MLA」。本节记该模型独有坑。
## 1. W4A4 走 MXFP4 路径
- GLM-5.1 的 W4A4 使用 **mxfp4**(per_block + minmax,act 加 `ext.axes: -1`),而非 int4;attention/一般 FFN 用 mxfp8 提级。
- 结构拆分:`*self_attn*`(排除 `*kv_b_proj`/`*wk`/`*weights_proj`)→ mxfp8;`*mlp*`(排除 `*gate`/`*mlp.experts.*`)→ mxfp8;`*mlp.experts.*` → mxfp4。
- 原因:MXFP 系以块为单位独立缩放,适合低比特场景下稳定精度;experts 参数量大,走 mxfp4 压缩收益高,attention 与 gate 等敏感结构提级 mxfp8 保精度。专家意见可信度:中。
## 2. W4A8 int 路径(多层尾部/首层排除)
- W4A8 用 `quarot(export_extra_info: True)` + `flex_awq_ssz`(enable `up-down`)+ `flex_smooth_quant`(enable `norm-linear`/`ov`/`up-down`)+ `fa3_quant`。
- `flex_awq_ssz` 排除 `model.layers.0/1/2.*` 与 `*mlp.shared_experts.*`(首层保护 + shared 高精度)。
- `fa3_quant` 排除 `model.layers.0~4.*` 与 `model.layers.74~78.*`(首/尾敏感层)。
- `linear_quant` 各段排除 `model.layers.78.*`;MLA 低秩投影 `*kv_b_proj`/`*wk`/`*weights_proj` 排除。
- 原因:首层与尾部层对量化噪声最敏感,首层误差向后续所有层传播,尾部层输出直接决定最终质量。专家意见可信度:中。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |