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 llmcompression-add-modelgit 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/llmcompression-add-model)<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/llmcompression-add-model"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/llmcompression-add-model/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/llmcompression-add-model"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/llmcompression-add-model.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.00041 | $0.03873 |
| Opus 5.5 | $0.00016 | $0.01549 |
| Sonnet 5.5 | $0.00008 | $0.00775 |
| Haiku 4.5 | $0.00004 | $0.00387 |
Grade A, and why
llmcompression-add-model 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 2mo 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 — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
新增 LLM/VLM 模型到 llm_compression
整体流程
- 确定参考源 → leap_llm 或 transformers
- 差异分析 → 详细对比新增模型与参考模型的 diff
- 创建目录结构 →
llm_compression/models/<model_name>/ - 编写 blocks/、
model.py、process_utils.py、<model_name>_model.py - 创建配置文件 →
llm_compression/configs/<model_name>.yml - 注册模型 →
llm_compression/models/__init__.py - 自测验证 → 至少完成 smoke test;如真实权重不可用,做半真实配置验证
- 生成报告 → 输出接入报告并记录关键问题、解决方式和验证结果
Step 0:确定参考源
首先检查 leap_llm/models/ 下有没有同名目录:
- 有:以
leap_llm该模型的forward()方法为主要参考(不是build()) - 没有:去 transformers 源码查找:
<site-packages>/transformers/models/<model_name>/modeling_<model_name>.py
同时参考已集成模型的框架写法:
- VLM:
llm_compression/models/qwen2_5_vl/(无 QK-Norm)或qwen3_vl/(有 QK-Norm + DeepStack) - LLM:
llm_compression/models/qwen3/
当 leap_llm 没有参考模型时(从 transformers 对齐)
必须直接阅读 transformers 源码,提取模型结构信息。详细的阅读方法、config 字段速查和对齐检查清单见 transformers_alignment_guide.md。
核心步骤:
- 阅读
configuration_<model>.py:获取 config 字段及默认值 - 阅读
modeling_<model>.py:提取 Attention/MLP/DecoderLayer/Model/ForCausalLM 结构 - 与框架内参考模型逐项对比差异
Step 0.5:差异分析(必须在写代码前完成)
整理差异清单,包含三类:
- 模型层 diff:attention 形式(q_norm/k_norm、attention_bias、sliding_window)、mlp(bias、激活函数)、norm 类型、rope 实现、权重命名
- 数据层 diff:position_ids 方式(1D 还是 3D mRoPE)、mask 形状、padding 方向、多模态输入
- generate 逻辑层 diff:prefill/decode 流程、chunk_prefill、cache 管理、停止条件
要求:
- 明确指出哪里相同、哪里不同,不要笼统说"类似 qwen3"
- 无法确认的点标记"待确认"
Step 1:blocks/attention.py
1.0 License 头声明(blocks/ 下所有文件 + model.py 必须添加)
models/*/blocks/ 下的所有 .py 文件以及 models/*/model.py 派生自 HuggingFace Transformers(Apache 2.0),必须保留 transformers 原始的完整 License 声明,并追加 Horizon 修改声明。
获取正确的 Copyright 行:查看 transformers/models/<model>/modeling_<model>.py 文件头的 Copyright 行,原样复制。不同模型的 Copyright 行不同(如 Qwen 系列含 Alibaba Group,Gemma 系列只有 HuggingFace Team)。
# Copyright <year> <original authors from transformers>. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Modifications Copyright (c) Horizon Robotics. All rights reserved.
What ships with it
3 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.
- 2mo ago First seen · 306 lines · 41 tokens per session scan A af51b8dc0329
llmcompression-add-model is a skill published in the GitHub repository HorizonRobotics/OE-Skills (27 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 41 tokens to every session and 3,873 once invoked, about $0.0002 per session on Opus 5.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.
llmcompression-add-model compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| llmcompression-add-modelHorizonRobotics/OE-Skills | Skill | 27 | 4mo ago | Apache-2.0 | A | 41 | Claude Code, Codex |
| agent-platform-model-registrygoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| foundry-config-setupmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 65 | Claude Code, Codex |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| training-checkwanshuiyin/Auto-claude-code-research-in-sleep | Skill | 19k | 3d ago | MIT | A | 35 | Claude Code |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 30 | Claude Code |
| finetuningmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 132 | Claude Code |