Borrowing it
Nothing to install: this file belongs to AXERA-TECH/Magnetar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AXERA-TECH/Magnetar/main/.codex/skills/magnetar/hidden/compile/SKILL.mdgit clone --depth 1 https://github.com/AXERA-TECH/MagnetarWrote 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/axera-tech/magnetar/compile)<a href="https://agentmods.dev/skills/axera-tech/magnetar/compile"><img src="https://agentmods.dev/badge/skills/axera-tech/magnetar/compile/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/axera-tech/magnetar/compile"><img src="https://agentmods.dev/badge/skills/axera-tech/magnetar/compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00024 | $0.00707 |
| Opus 5.5 | $0.00010 | $0.00283 |
| Sonnet 5.5 | $0.00005 | $0.00141 |
| Haiku 4.5 | $0.00002 | $0.00071 |
Grade A, and why
compile 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 1mo 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.
What it actually says
COMPILE
执行
magnetar.stages.compile.run(task_dir, target_hw, pulsar_image)
关键约束
highest_mix_precision必须为falsecalibration_std用 255(非 0.004)——Pulsar2 用/std公式- 编译前确认 ONNX 为静态 shape
- 校准/输入格式先查
docs/input-format-cheatsheet.md(python magnetar/pulsar2_ref.py --cases),不要试新格式
LLM 分支(model_route=llm)
model_dir = magnetar.stages.llm.llm_build(task_dir, input_path=origin/<model>, chip=TARGET_HARDWARE, pulsar_image=..., max_context=..., prefill_len=..., weight_type=s8|s4, hidden_state_type=bf16)
内部流程:
pulsar2 llm_build2直接编译 HuggingFace 权重 →compile/llm_out/: 逐层*_l%d_*.axmodel+*post*.axmodel+model.embed_tokens.weight.bfloat16.bin, 自带逐层 decode/prefill cosine 校验(日志cos_sim is: X);ensure_axllm_build_tools克隆 ax-llm-build,embed_process.sh处理 embedding;- 组装
compile/llm_model_dir/:config.json(axllm 字段:tokenizer_type、 template_filename_axmodel、axmodel_num、filename_post_axmodel、 filename_tokens_embed、tokens_embed_num/size)+ tokenizer + axmodel + post_config.json + model_meta.json; - 生成
export/model_meta.json(route=llm,compile_cosine 取逐层 cosine 统计: min/mean/all_ge_0_99)与compile/compile_report.md。
失败处理:llm_build2 报架构/head_dim/算子不支持 → 回退 EXPORT 调整参数或拆分, 仍失败 STOP 由用户决定是否回退通用 ONNX 路径;逐层 cosine < 0.99 → 回退 COMPILE 重试(weight_type s8→s4、bf16→fp16、调 max_context/prefill)。
验证
compile/model.axmodel存在且非空compile/compile_report.md含 MACs、大小、压缩比、编译耗时- LLM 分支:
compile/llm_model_dir/含 config.json + tokenizer + 逐层/post axmodel + embedding bin;export/model_meta.jsoncompile_cosine.min ≥ 0.99
STOP
- Pulsar2 编译失败且需改 ONNX → 退回 EXPORT
- 输入预处理配置与导出验证不一致
- LLM 分支:llm_build2 不可用(Pulsar2 < 6.0)→ blocked;不支持架构且用户未定回退方向
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.
- 1mo ago First seen · 49 lines · 24 tokens per session scan A d2718486d77f
compile is a skill published in the GitHub repository AXERA-TECH/Magnetar (22 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 707 once invoked, about $0.0001 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.
Other skills, from other repositories
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.
chief-data-officer-advisor
Chief Data Officer advisory for startups: AI training data rights and consent provenance, data product strategy (warehouse vs lakehouse vs mesh, build-vs-buy), B2B customer-data-as-asset valuation and M&A readiness, data team org evolution. Use when deciding whether to train models on customer data, choosing data…
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
cdf-anomalygen
Use when running the CDF AnomalyGen pipeline over a defect dataset — mask placement, fine-tuning, synthetic defect-image generation (SDG), evaluation, quality refinement, and pseudo-labeling — even when the user names only one stage.
cdf-event-video-generation
Run the CDF Orchestration Event Video Generation DAG on Kubernetes or OSMO - image-to-video anomaly generation, auto-labeling, and anomaly dataset generation. Select for requests about event video generation, anomaly video generation, image-to-video synthesis, Cosmos3 image2video, anomaly dataset creation…
deepstream-sop
Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…