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-quantizationgit 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-quantization)<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-quantization"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-plugin-quantization.svg" alt="Measured on agentmods" 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.00123 | $0.03678 |
| Opus 5 | $0.00062 | $0.01839 |
| Sonnet 5 | $0.00025 | $0.00736 |
| Haiku 4.5 | $0.00012 | $0.00368 |
Grade A, and why
j6-plugin-quantization 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 7d 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 — 329 lines — stays where its author put it; the contents beside it link to each section on GitHub.
基础结构量化流程代码生成
目标
根据用户提供的浮点模型结构,生成量化流程代码,从 set_march 到 QAT 训练完成。生成后的代码可直接运行(在正确安装了 horizon_plugin_pytorch 和 hbdk4 的环境中)。
本 Skill 覆盖的流程:
set_march → 定义模型(含 Quant/DeQuant)→ 配置量化参数 → prepare → 校准 → [可选] QAT 训练
量化流程的输出取决于用户选择:
- 仅校准:输出
calib_net - 校准 + QAT:输出
qat_net
供 j6-hbdk-export-compile skill 消费。
第一步:确认信息
在生成代码前,必须确认以下信息。march 是必选项,必须由用户明确指定,不能擅自假设默认值。如果用户未指定且无法交互(如 eval 场景),则使用 "nash-p" 作为默认值,不得自行选择其他 march。
必须询问:march(目标平台)
向用户询问目标平台,给出以下选项:
| march | 平台 | 说明 |
|---|---|---|
"nash-p" |
J6P | 推荐,全局激活支持 float16 |
"nash-h" |
J6H | 全局激活支持 float16 |
"nash-m" |
J6M | 全局激活为 qint8 |
"nash-e" |
J6E | 全局激活为 qint8 |
"nash-b" |
J6B | 全局激活为 qint8 |
如果用户未指定,暂停代码生成,等待用户确认。不同的 march 会影响全局激活类型的选择:
- nash-p / nash-h:推荐全局激活
torch.float16 - nash-m / nash-e / nash-b:推荐全局激活
qint8
必须询问:校准后是否进行 QAT 训练
向用户询问校准后的流程选择:
| 选项 | 说明 |
|---|---|
| 仅校准(calib-only) | 校准后直接导出,速度快,适合精度要求不高的场景 |
| 校准 + QAT 训练(calib+qat) | 校准后重新 prepare 并进行 QAT 训练,精度更高,推荐用于精度敏感场景 |
两种选项的代码差异:
仅校准:校准完成后,输出 calib_net,后续由 j6-hbdk-export-compile 直接 export。
校准 + QAT:校准完成后,使用 MinMaxObserver 重新 prepare 浮点模型,执行 QAT 训练,输出 qat_net。
可选确认(用户未提供时使用默认值)
| 信息 | 默认值 | 说明 |
|---|---|---|
| 模型结构 | Conv+BN+ReLU+Linear | 基础网络结构 |
| 输入 shape | (1, 3, 32, 32) | 示例输入大小 |
| 是否有自定义量化配置 | 否 | 是否需要指定某些层使用 qint16 等 |
第二步:生成代码 — 按步骤组织
Step 1: 导入
import torch
import torch.nn as nn
from horizon_plugin_pytorch.quantization import QuantStub
from torch.quantization import DeQuantStub
from horizon_plugin_pytorch import set_march
from horizon_plugin_pytorch.quantization import (
prepare, set_fake_quantize, FakeQuantState,
QconfigSetter, get_qconfig, qint8, qint16,
)
from horizon_plugin_pytorch.quantization.observer_v2 import HistogramObserver, MinMaxObserver
from horizon_plugin_pytorch.quantization.qconfig_setter import (
ModuleNameTemplate, ConvDtypeTemplate, MatmulDtypeTemplate,
)
注意: 当本 sub-skill 作为 j6-plugin-hbdk-generating(编排型 skill)的一部分被调用时,导入语句必须与导出编译子 skill 的导入合并到文件顶部的一个统一导入块中,格式严格遵循 references/full-pipeline-template.md。
What ships with it
1 file 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.
- 7d ago First seen · 329 lines · 123 tokens per session scan A 3c1d1b9b4610
j6-plugin-quantization is a skill published in the GitHub repository HorizonRobotics/OE-Skills (19 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 123 tokens to every session and 3,678 once invoked, about $0.0006 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.
amc-run-rtsp-calibration
Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.
amc-run-video-calibration
Calibrates pre-recorded cam.mp4 datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to amc-run-rtsp-calibration.