Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add HorizonRobotics/OE-Skills --skill j6-plugin-precision-tuninggit clone --depth 1 https://github.com/HorizonRobotics/OE-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-precision-tuning)<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-precision-tuning"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-plugin-precision-tuning/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-precision-tuning"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-plugin-precision-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.05052 |
| Opus 5 | $0.00024 | $0.02526 |
| Sonnet 5 | $0.00010 | $0.01010 |
| Haiku 4.5 | $0.00005 | $0.00505 |
Grade A, and why
j6-plugin-precision-tuning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 464 lines — stays where its author put it; the contents beside it link to each section on GitHub.
J6 Horizon Plugin PyTorch 精度调优
核心原则
解决 PyTorch 侧 的训练/校准精度问题。
按下面顺序收敛问题:
- 先看
Calibration / QAT哪一段开始掉点。 - 用
QuantAnalysis围绕 badcase 做逐层比较和敏感度分析。 - 只有基础问题基本排干净后,再做
int8 / int16 / fp16混合精度取舍。
不要直接把 float 模型和 QAT 模型拿来做常规逐层比较。
常规精度 debug 优先比较 float vs calibration(fake_quant);QAT 训练异常时,更多是用 float finetune、关 fake quant、lr=0 之类手段排查训练 pipeline。
执行前门禁
在给出调优建议、修改 qconfig、或要求用户重跑大量实验前,先确认下面信息够不够:
| 必需信息 | 为什么需要 |
|---|---|
当前异常阶段:Calibration / QAT |
决定先走哪条排查路径 |
| 至少一个稳定评测指标 | 防止只盯单帧数值、忽略真实精度 |
| 当前模型类型:float / calibration / qat | 防止用错工具和比较对象 |
| 平台 / march:J6E/M 还是 J6P | 决定 int16 / fp16 的主路线 |
| 用于查 badcase 的 dataloader | QuantAnalysis 后续步骤都依赖它 |
现有产物:敏感度表、逐层对比结果等(若已有 model_check_result.txt 也可作为背景参考) |
避免重复劳动 |
推荐补充信息
- 校准数据量、batch size、observer 类型。
- QAT 学习率、weight decay、是否 freeze BN。
- 是否已经试过关闭 fake quant、
lr=0、float finetune。
如果缺少这些信息且会影响判断,先要求补充;不要在没有 badcase 或没有阶段归属的情况下直接开混合精度“盲调”。
先判断问题更像哪一类
| 现象 | 更像的问题 | 优先动作 |
|---|---|---|
Calibration 精度崩溃 |
scale、fixed scale、共享模块、量化不友好模块、pipeline 问题 | 结合已有检查结果,再做 float vs calibration badcase 分析 |
Calibration 还行,QAT 崩溃或 loss 异常 |
训练 pipeline、训练参数、fake quant 使用方式问题 | 先排查 float finetune / _FLOAT / lr=0 |
| 全 int16 都不达标 | 不是简单 int8 分辨率不够,可能有 pipeline 或模块本身不友好 | 先解决全 int16 基线,再谈更复杂混合精度 |
| 全 int16 达标,全 int8 不达标 | 正常进入混合精度调优 | 用敏感度结果挑高精度算子 |
| 需要决定哪些算子升到 int16 | 混合精度配置问题 | 用 sensitivity() + qconfig 模板 |
正确 API 用法
1) prepare、QconfigSetter 与模板
当前仓库主推的混合精度配置方式是 QconfigSetter + templates:
import torch
from horizon_plugin_pytorch.quantization import (
QconfigSetter,
get_qconfig,
prepare,
qint8,
qint16,
)
from horizon_plugin_pytorch.quantization.qconfig_setter import (
ConvDtypeTemplate,
MatmulDtypeTemplate,
ModuleNameTemplate,
SensitivityTemplate,
)
setter = QconfigSetter(
reference_qconfig=get_qconfig(),
templates=[
ModuleNameTemplate({"": torch.float16}),
ConvDtypeTemplate(input_dtype=qint8, weight_dtype=qint8),
MatmulDtypeTemplate(input_dtypes=qint8),
SensitivityTemplate(
sensitive_table=table,
topk_or_ratio=0.2,
sensitive_type="activation",
low_precision_dtype=qint8,
high_precision_dtype=qint16,
),
],
)
qat_model = prepare(model, example_inputs=example_inputs, qconfig_setter=setter)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 464 lines · 49 tokens per session scan A 00f333f20003
j6-plugin-precision-tuning is a skill published in the GitHub repository HorizonRobotics/OE-Skills (19 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 49 tokens to every session and 5,052 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
spark-environment-setup
Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.
spark-memory-thermal-ops
Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
spark-training-gotchas
Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.
llama-cpp
Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.
minicpm5-deploy-vllm-ascend
Deploy MiniCPM5-2B with vLLM on Huawei Ascend NPU using vLLM-Ascend. Use when the user mentions vLLM-Ascend, Ascend NPU, Huawei Ascend, CANN, torchnpu, davinci devices, or wants an OpenAI-compatible MiniCPM5 server on Ascend hardware.
minicpm5-deploy-litert
Run MiniCPM5-2B or MiniCPM5-1B on-device with Google's LiteRT-LM runtime — the litert-lm CLI or its OpenAI-compatible server on a desktop, the Kotlin API or the AI Edge Gallery app on Android, the same .litertlm bundle on CPU or GPU. Use when the user says "LiteRT", "LiteRT-LM", "litertlm", ".litertlm", "Android"…