feat(agents): Add hierarchical language support for VLA training#264
Draft
yuecideng wants to merge 1 commit into
Draft
feat(agents): Add hierarchical language support for VLA training#264yuecideng wants to merge 1 commit into
yuecideng wants to merge 1 commit into
Conversation
Add comprehensive language support to Online Data Streaming (ODS) for Vision-Language-Action (VLA) model training. The implementation provides: - Hierarchical language structure (task/subtask/primitive levels) - Multiple language sources (file, env, template, LLM) - Flexible storage modes (tokens, embeddings, hybrid) - LanguageManager for tokenization and data management - Integration with ODS shared memory buffer New files: - embodichain/lab/gym/envs/managers/language.py: LanguageManager, configs - embodichain/lab/gym/envs/managers/language_provider.py: Language providers - configs/language/: Example configurations and documentation - tests/agents/test_language_support.py: Test suite Modified files: - embodichain/agents/engine/data.py: Add language_cfg to OnlineDataEngine - embodichain/lab/gym/envs/embodied_env.py: Integrate LanguageManager - embodichain/lab/gym/utils/gym_utils.py: Extend buffer initialization - embodichain/lab/gym/envs/managers/__init__.py: Export language classes This enables VLA models to learn from multi-scale language representations similar to human task understanding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds comprehensive language support to Online Data Streaming (ODS) for Vision-Language-Action (VLA) model training. The implementation enables VLA models to learn from multi-scale language representations similar to human task understanding.
Key Features
Hierarchical Language Structure: Organizes instructions at three abstraction levels:
Multiple Language Sources:
Flexible Storage: Supports tokens, embeddings, or hybrid storage modes
LanguageManager: Handles tokenization and language data management with support for:
Changes
New files:
embodichain/lab/gym/envs/managers/language.py- LanguageManager, configs, and data structuresembodichain/lab/gym/envs/managers/language_provider.py- Language providers for different sourcesconfigs/language/- Example configurations, documentation, and usage examplestests/agents/test_language_support.py- Test suite (7 passed, 4 skipped due to optional dependencies)Modified files:
embodichain/agents/engine/data.py- Addedlanguage_cfgtoOnlineDataEngineCfgand buffer creationembodichain/lab/gym/envs/embodied_env.py- Integrated LanguageManager and language data writingembodichain/lab/gym/utils/gym_utils.py- Extendedinit_rollout_buffer_from_configto allocate language fieldsembodichain/lab/gym/envs/managers/__init__.py- Exported new language classesBuffer Structure
When language support is enabled, the rollout buffer includes:
{level}_tokens: Token IDs for each hierarchy level{level}_attention_mask: Attention masks for padding{level}_count: Number of instructions per levelinstruction_counts: Counts across all levelschange_points: Timesteps where language changeshierarchy_depth: Current depth of hierarchy (1-3)instruction_types: Instruction type IDsUsage Example
Type of change
Screenshots
N/A
Checklist
black .command to format the code base.🤖 Generated with Claude Code