offline-packing-env-vars

Configure OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA for LLaVA-OneVision2 training.

1.2k|78|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-2 --skill offline-packing-env-vars
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: offline-packing-env-vars
Source: https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-2/tree/main/.opencode/skills/offline-packing-env-vars
Command: npx skills add https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-2 --skill offline-packing-env-vars

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This bilingual guide explains how to configure and debug the OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA environment variables that control LLaVA-OneVision2 training-side packing, clarifying why both must be enabled together to achieve padding-free attention.

Core Features & Use Cases

  • Gate duality: documents the two orthogonal gating steps (Data-layer BMR and Batch-layer data packing) and their impact on cu_lengths and sub-sample encoding.
  • VQA gate deprecation warning: highlights that OFFLINE_PACKING_VQA is dead code and should not be relied upon.
  • Practical guidance: provides end-to-end workflow, validation steps, and diagnostics for real-world training pipelines using packed shards.

Quick Start

Set both OFFLINE_PACKING_BMR=1 and OFFLINE_PACKED_DATA=1 in your training shell, ensure MBS=1, and run your packed dataset training.

Frequently Asked Questions about offline-packing-env-vars

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do I need both OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA enabled for LLaVA-OneVision2 training?

Both OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA must be enabled together to achieve padding-free attention. Enabling only one gate risks silent cross-sub-sample leakage during training pipeline execution due to incorrect cu_lengths handling.

How do I configure environment variables for offline packing in LLaVA-OneVision2 training pipelines?

To configure offline packing, set both OFFLINE_PACKING_BMR=1 and OFFLINE_PACKED_DATA=1 in your training shell. You must also ensure MBS=1 before running your training workflow with packed datasets.

What is the two-stage gating mechanism for offline packing in LLaVA-OneVision2?

The two-stage gating mechanism consists of Data-layer BMR and Batch-layer data packing. These orthogonal gates control sub-sample encoding and cu_lengths handling to ensure safe, padding-free attention during training.

Can I use OFFLINE_PACKING_VQA for packing in LLaVA-OneVision2 training?

No, OFFLINE_PACKING_VQA is dead code and should not be relied upon. You must use the two orthogonal environment gates, OFFLINE_PACKING_BMR and OFFLINE_PACKED_DATA, to properly control training-side packing.

What happens if I only enable one offline packing environment gate in my training pipeline?

Enabling only one offline packing gate causes silent cross-sub-sample leakage. This occurs because the two-stage gating process is incomplete, leading to incorrect cu_lengths handling and unsafe model attention.