LLaVA-OneVision-2 is an openly released multimodal AI model and training framework that processes images, long-form video, and spatial information. Researchers use it to train, evaluate, and reproduce vision-language models with the project’s released data, encoders, checkpoints, and training records. The catalogue skills support work with this model and its training resources.
Borrowing it
Nothing to install: this file belongs to EvolvingLMMs-Lab/LLaVA-OneVision-2. 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/EvolvingLMMs-Lab/LLaVA-OneVision-2/main/.opencode/skills/megatron-checkpoint-layout/SKILL.mdgit clone --depth 1 https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-2Wrote 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/evolvinglmms-lab/llava-onevision-2/megatron-checkpoint-layout)<a href="https://agentmods.dev/skills/evolvinglmms-lab/llava-onevision-2/megatron-checkpoint-layout"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/megatron-checkpoint-layout/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/evolvinglmms-lab/llava-onevision-2/megatron-checkpoint-layout"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/megatron-checkpoint-layout.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.00033 | $0.01367 |
| Opus 5 | $0.00016 | $0.00683 |
| Sonnet 5 | $0.00007 | $0.00273 |
| Haiku 4.5 | $0.00003 | $0.00137 |
Grade A, and why
megatron-checkpoint-layout 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 9d 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose / 用途
Use this skill when diagnosing, designing, or converting Megatron/Megatron-Core checkpoints that may use TP, PP, and EP.
在排查、设计或转换使用 TP、PP、EP 的 Megatron / Megatron-Core checkpoint 时,使用这个 skill。
Core rule / 核心规则
-
TP only:
mp_rank_{tp} -
TP + PP:
mp_rank_{tp}_{pp} -
TP + PP + EP:
mp_rank_{tp}_{pp}_{ep} -
只有 TP:
mp_rank_{tp} -
TP + PP:
mp_rank_{tp}_{pp} -
TP + PP + EP:
mp_rank_{tp}_{pp}_{ep}
The key discriminator is whether expert parallelism participates in checkpoint sharding.
真正的分界点是:expert parallelism 是否参与了 checkpoint 切分。
-
If EP is present, treat the checkpoint layout as 3D.
-
If EP is absent, treat the checkpoint layout as non-EP and use 1D or 2D.
-
如果存在 EP,就按 3D 布局处理。
-
如果不存在 EP,就按非 EP 布局处理,即 1D 或 2D。
Mental model / 心智模型
Megatron does not treat pp > 1 as meaning 3D by itself.
Megatron 不会因为 pp > 1 就自动把 checkpoint 视为 3D。
-
PP adds a pipeline index.
-
EP adds an expert index.
-
The third coordinate exists because EP exists, not because PP exists.
-
PP 只是在目录里增加 pipeline 这一维。
-
EP 才会增加 expert 这一维。
-
第三维存在的原因是 EP 存在,而不是因为 PP 存在。
So even if tp=1 and pp=1, once EP is enabled the checkpoint naming is still conceptually 3D because ranks are addressed by (tp, pp, ep).
所以即使 tp=1 且 pp=1,只要启用了 EP,checkpoint 在语义上仍然是 3D,因为 rank 仍然由 (tp, pp, ep) 共同定位。
Practical interpretation / 实际使用解释
When reading or converting checkpoints:
在读取或转换 checkpoint 时:
-
First decide whether EP exists in the checkpoint contract.
-
If EP exists, require
mp_rank_{tp}_{pp}_{ep}. -
If EP does not exist, read as
mp_rank_{tp}ormp_rank_{tp}_{pp}. -
Do not infer 3D solely from
pipeline_model_parallel_size > 1. -
先判断这个 checkpoint 契约里是否存在 EP。
-
如果存在 EP,就要求目录是
mp_rank_{tp}_{pp}_{ep}。 -
如果不存在 EP,就按
mp_rank_{tp}或mp_rank_{tp}_{pp}去读。 -
不要仅凭
pipeline_model_parallel_size > 1就推断它一定是 3D。
Typical failure pattern / 典型错误模式
Bad assumption:
错误假设:
-
pp > 1so loader chooses a 3D reader. -
只要
pp > 1,loader 就应该走 3D reader。
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.
- 9d ago First seen · 138 lines · 33 tokens per session scan A b212be2d57c6
megatron-checkpoint-layout is a skill published in the GitHub repository EvolvingLMMs-Lab/LLaVA-OneVision-2 (1,199 stars, last pushed yesterday), licensed Apache-2.0. It adds 33 tokens to every session and 1,367 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
add-new-model
Use this skill when the user wants to add or port a new model architecture to MLX-VLM — mapping a Hugging Face modeltype to a new file under mlxvlm/models, writing the ModelConfig, matching layer/weight names, reusing a similar existing model, adding a test class, and validating the port. Covers vision-language…
cli-inference
Use this skill when the user wants to run or debug MLX-VLM inference from the command line, including uv run mlxvlm.generate, image/audio/video inputs, local model paths, Hugging Face model IDs, deterministic repro commands, and CLI errors around processors, prompts, model loading, or missing weights.
convert-quantize
Use this skill when the user wants to convert a Hugging Face model to MLX or quantize/dequantize one with mlxvlm.convert, including bits and group size, quant modes (affine, mxfp4, nvfp4, mxfp8), RTN vs AWQ, mixed-bit recipes, dtype casts, calibration (text or multimodal), local vs Hub paths, revisions, uploading to…
server-inference
Use this skill when the user wants to run or debug MLX-VLM server inference, including uv run mlxvlm.server, /v1/models, /v1/chat/completions, /v1/responses, streaming, OpenAI-compatible clients, health checks, metrics, model unload/reload, adapters, trust-remote-code, and server request/response failures.
hf-cache-models
Use this skill when the user wants to list, inspect, or report MLX-VLM model candidates available in the local Hugging Face cache directory, including the server's opt-in hf-cache discovery mode, cache-dir overrides, JSON output, or issue-ready cached model lists.
weights-and-biases
W&B: log ML experiments, sweeps, model registry, dashboards.