j6-hmct-cosine-similarity-tuning

j6-hmct-cosine-similarity-tuning is a skill for Claude Code, Codex from HorizonRobotics/OE-Skills. It costs 126 tokens per session (3,980 once invoked), scanned A, original, Apache-2.0.

A workflow for improving the numerical accuracy of quantized HMCT models. Quantization uses lower-precision numbers to make models smaller or faster, and cosine similarity compares their outputs with the original model.

In plain words
What is it for?
It tests INT8, INT16, dual-INT16, and FP16 configurations, analyzes sensitive nodes, finds a smaller mixed-precision configuration meeting the target, and writes a tuning report.
Why use it?
It reduces the manual trial and error involved when a quantized model’s output is not accurate enough.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It tests INT8, INT16, dual-INT16, and FP16 configurations, analyzes sensitive nodes, finds a smaller mixed-precision configuration meeting the target, and writes a tuning report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning
Install

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.

Any agent
npx skills add HorizonRobotics/OE-Skills --skill j6-hmct-cosine-similarity-tuning
Clone the repo
git clone --depth 1 https://github.com/HorizonRobotics/OE-Skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for j6-hmct-cosine-similarity-tuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning/github.svg)](https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning)
Your own site
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-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.

agentmods 80×15 button for j6-hmct-cosine-similarity-tuning

Your own site · 80×15
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hmct-cosine-similarity-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00126 $0.03980
Opus 5 $0.00063 $0.01990
Sonnet 5 $0.00025 $0.00796
Haiku 4.5 $0.00013 $0.00398

Measured 12d ago against content hash b154276fd544, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

j6-hmct-cosine-similarity-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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (script/get_sensitivity_of_nodes.py, script/hmct_precision_tuning.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

horizon/skills/hmct/j6-hmct-cosine-similarity-tuning/SKILL.md · 325 lines

How it starts

The opening of the file, as written. The whole thing — 325 lines — stays where its author put it; the contents beside it link to each section on GitHub.

J6 HMCT Cosine Similarity 调优(工作流)

适用前提(必须一致)

  • 同一 onnx / 同一校准数据 / 同一评测口径:对比不同量化配置时只改变 quant_config,其余输入保持一致。
  • 目标:以 HMCT 打印的 The quantized model outputCosine Similarity(输出节点级) 为达标指标(默认阈值 ≥0.99)。

脚本文件

本 Skill 提供以下脚本:

脚本 说明
script/hmct_precision_tuning.py 主调优脚本:自动执行阶段 1-7 完整流程
script/get_sensitivity_of_nodes.py 节点敏感度分析脚本

快速开始

完整自动调优(推荐)

python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --march nash-p

使用用户固定配置

python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --node_config_path "fixed_config.json"

指定 bad case 数量

python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --num_sample 5

自定义渐进式阈值

python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --progressive_thresholds 0.99 0.999 0.9999

指定校准方法(默认不指定)

默认情况下脚本不在 quant_config 中写入 calibration_type,由 HMCT 内部决定校准策略。 若需要显式指定,可使用 --calibration_type

# 单一方法
python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --calibration_type max

# 多方法(HMCT 会做 modelwise search)
python3 script/hmct_precision_tuning.py \
  --onnx_path "model.onnx" \
  --cali_data_dir "./cali_data" \
  --calibration_type max kl

可选值参考 HMCT:maxklload 等。

配置量化策略开关(默认不指定)

可在调优过程中显式开关三类量化策略,所有阶段都会以相同配置写入 quant_config

参数 写入字段 含义
--per_channel model_config.activation.per_channel 激活 per-channel 量化开启与否,可选 false / true,HMCT 默认 false;支持同时传两个值(如 true false)触发 modelwise search
--asymmetric model_config.activation.asymmetric 激活非对称量化开启与否,可选 false / true,HMCT 默认 false;支持同时传两个值触发 modelwise search
--bias_correction model_config.weight.bias_correction 是否开启权重 bias correction;当为 true 时写入 bias_correction 子结构
--bias_correction_num_sample model_config.weight.bias_correction.num_sample bias correction 样本数,int >= 1,默认 1;仅当 --bias_correction true 时生效
--bias_correction_metric model_config.weight.bias_correction.metric bias correction 误差度量,可选 cosine-similarity / mse / mae / mre / sqnr / chebyshev,默认 cosine-similarity;仅当 --bias_correction true 时生效

Read the full file on GitHub · 325 lines

Files

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.

Changes

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.

  1. 12d ago First seen · 325 lines · 126 tokens per session scan A b154276fd544

Subscribe to this mod's changes

j6-hmct-cosine-similarity-tuning is a skill published in the GitHub repository HorizonRobotics/OE-Skills (19 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 126 tokens to every session and 3,980 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.

Related

Other skills, from other repositories

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens