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/offline-packing-env-vars/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/offline-packing-env-vars)<a href="https://agentmods.dev/skills/evolvinglmms-lab/llava-onevision-2/offline-packing-env-vars"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/offline-packing-env-vars/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/offline-packing-env-vars"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/offline-packing-env-vars.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.00065 | $0.04371 |
| Opus 5 | $0.00032 | $0.02185 |
| Sonnet 5 | $0.00013 | $0.00874 |
| Haiku 4.5 | $0.00006 | $0.00437 |
Grade A, and why
offline-packing-env-vars 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 10d 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 — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose / 用途
Use this skill when you set up or debug training-side sample packing for LLaVA-OneVision2 — i.e. when you need to decide which env vars to export in a training shell script (Stage-1 / Stage-1.5 / Stage-2) and want to understand why both OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA must be 1 to actually get padding-free attention.
在配置或调试 LLaVA-OneVision2 训练侧的样本 packing 时使用——比如要决定在训练 shell 脚本(Stage-1 / Stage-1.5 / Stage-2)中导出哪些环境变量,以及为什么必须 OFFLINE_PACKING_BMR=1 和 OFFLINE_PACKED_DATA=1 同时打开才能真正获得 padding-free 的 attention。
This skill is specifically for:
- Choosing the correct env var combination in training scripts
- Diagnosing cross-sample attention leakage in packed runs
- Understanding why
cu_lengthsis a dummy[[0]]in some runs and a real[B, P+1]tensor in others - Avoiding the well-known
OFFLINE_PACKING_VQAred herring (it is dead code)
Companion skill: cu-lengths-attention-flow covers the consumer side (how cu_lengths is fed into ViT/LLM attention). This skill covers the producer + gate side.
姊妹 skill:cu-lengths-attention-flow 讲消费端(cu_lengths 如何送入 ViT/LLM attention)。本 skill 讲生产端 + 开关。
TL;DR / 一句话总结
For packed training to work end-to-end, both env vars must be 1:
export OFFLINE_PACKING_BMR='1' # data-layer gate: build real cu_lengths
export OFFLINE_PACKED_DATA='1' # batch-layer gate: forward real cu_lengths to model
Setting only one is a silent bug. OFFLINE_PACKING_VQA is dead code; do not rely on it.
The Three Env Vars / 三个环境变量真相表
| Env var | Status | Default | Read at | Effect |
|---|---|---|---|---|
OFFLINE_PACKING_BMR |
ALIVE | 0 |
aiak_training_llm/data/multimodal/task_encoder.py:194 |
Inside PackedCaptioningSample handling, unroll each packed entry into a MultiMixQASample (BMR-style, with full prompt/caption messages). When 0, falls through to the legacy CaptioningSample branch which loses the multi-turn structure. |
OFFLINE_PACKED_DATA |
ALIVE | 0 |
aiak_training_llm/data/multimodal/task_encoder.py:363 |
Inside batch(), replace dummy cu_lengths = [[0]] with the real per-sample s.cu_lengths stacked across the batch. Without this, the consumer side cannot construct PackedSeqParams. |
OFFLINE_PACKING_VQA |
DEAD | n/a | nowhere in aiak_training_llm/ |
Mentioned in README + several legacy shells under examples/llava_onevision1_5/ and examples/llava_onevision2/quick_start_video_2b/, but no source file reads it. Setting it has zero runtime effect. Treat as documentation noise. |
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.
- 10d ago First seen · 271 lines · 65 tokens per session scan A 29b7228c2240
offline-packing-env-vars is a skill published in the GitHub repository EvolvingLMMs-Lab/LLaVA-OneVision-2 (1,200 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 4,371 once invoked, about $0.0003 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.