LLaVA-OneVision-2: Skill for OpenCode

.opencode/skills/distributed-offline-packing/SKILL.md

distributed-offline-packing is a skill for OpenCode from EvolvingLMMs-Lab/LLaVA-OneVision-2. It costs 40 tokens per session (2,905 once invoked), scanned C, original, Apache-2.0.

A bilingual guide for packing large supervised fine-tuning datasets into padding-free WebDataset files across multiple machines. Supervised fine-tuning means training a model on examples that include desired answers.

In plain words
What is it for?
Use it to split multimodal JSONL data, process it through the packing stages, and assemble Energon metadata for training.
Why use it?
It organizes very large JSONL datasets into fixed-length training shards while using several nodes in parallel. It also describes the shared storage, container, tokenizer, and image-processing requirements.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

This is EvolvingLMMs-Lab/LLaVA-OneVision-2's own configuration. It tells OpenCode how to work on LLaVA-OneVision-2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LLaVA-OneVision-2 configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python offline_packing/s2_compute_token_lengths.py \.

About the project

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.

EvolvingLMMs-Lab/LLaVA-OneVision-2 · 1,199 stars · on GitHub · evolvinglmms-lab.github.io

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/EvolvingLMMs-Lab/LLaVA-OneVision-2/main/.opencode/skills/distributed-offline-packing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-2

Made for: OpenCode.

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 distributed-offline-packing

README.md
[![agentmods](https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing/github.svg)](https://agentmods.dev/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing)
Your own site
<a href="https://agentmods.dev/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing/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 distributed-offline-packing

Your own site · 80×15
<a href="https://agentmods.dev/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing"><img src="https://agentmods.dev/badge/skills/evolvinglmms-lab/llava-onevision-2/distributed-offline-packing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 188
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00040 $0.02905
Opus 5 $0.00020 $0.01452
Sonnet 5 $0.00008 $0.00581
Haiku 4.5 $0.00004 $0.00291

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

Security

Grade C, and why

distributed-offline-packing scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

### Pitfall 3: starting fresh while old `rm -rf` still running on NFS
.opencode/skills/distributed-offline-packing/SKILL.md · 233 lines

How it starts

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

Purpose / 用途

Use this skill when packing a large SFT JSONL (hundreds of thousands to millions of samples) into Energon WebDataset shards at a fixed sequence length, using offline_packing/auto_pipe.sh parallelized across multiple nodes.

当需要把大规模 SFT JSONL(几十万到几百万样本)按固定序列长度打包成 Energon WebDataset shards,并通过 offline_packing/auto_pipe.sh 在多台机器上并行处理时,使用这个 skill。

Prerequisites / 前置条件

  • All nodes share the same NFS mount (data + repo + output)
  • Same docker image on every node (must contain transformers, energon, project repo)
  • offline_packing/auto_pipe.sh and stage scripts s1_split_json_to_samples.pys4_bins_to_webdataset.py
  • Tokenizer + image processor available locally (HF format model dir)
  • Source JSONL where each line has images, prompts, captions (multi-turn list-of-lists) and image paths are usable as-is

所有节点共享同一个 NFS(数据+代码+输出)。每台机器使用同一个 docker 镜像,里面要有 transformers、energon、项目代码。需要 offline_packing/auto_pipe.sh 和 s1–s4 四个 stage 脚本。Tokenizer 和 image processor 是本地 HF 格式目录。源 JSONL 每行包含 images / prompts / captions(多轮是 list-of-list),图片路径可直接使用。

Architecture / 架构

Pipeline Stages / 流水线阶段

JSONL (N samples)
  ├─ s1_split_json_to_samples.py   # validate + drop bad/missing-image samples
  │                                # output: per-sample serialized records
  ├─ s2_compute_token_lengths.py   # tokenize prompts/captions, compute image-patch tokens
  │                                # output: length array per sample
  ├─ s3_bin_packing.py             # BFD (Best-Fit-Decreasing) into bins of capacity L
  │                                # output: bin assignment
  └─ s4_bins_to_webdataset.py      # write tar shards + idx + .nv-meta/{dataset.yaml,split.yaml,sample_loader.py}

auto_pipe.sh runs all four stages sequentially on one node for one input file. To use N nodes, split the JSONL into N parts and run auto_pipe.sh independently on each — s3 BFD does NOT shard across nodes, so each node packs its own slice.

auto_pipe.sh 在一台机器上对一个输入文件顺序跑完四个 stage。要用 N 台机器就把 JSONL 切成 N 份,每台独立跑一次 auto_pipe.sh——s3 BFD 不能跨节点共享,所以每台只 pack 自己的那一份。

Read the full file on GitHub · 233 lines

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. 9d ago First seen · 233 lines · 40 tokens per session scan C 35d7fb36cc37

Subscribe to this mod's changes

distributed-offline-packing is a skill published in the GitHub repository EvolvingLMMs-Lab/LLaVA-OneVision-2 (1,199 stars, last pushed today), licensed Apache-2.0. It adds 40 tokens to every session and 2,905 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

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…

Blaizzy/mlx-vlm · 83 tokens

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…

Blaizzy/mlx-vlm · 99 tokens

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.

Blaizzy/mlx-vlm · 67 tokens

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.

Blaizzy/mlx-vlm · 80 tokens

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.

Blaizzy/mlx-vlm · 60 tokens

weights-and-biases

W&B: log ML experiments, sweeps, model registry, dashboards.

NousResearch/hermes-agent · 21 tokens