How kyegomez/rt-2 works
Project type and purpose
• This is an open-source Python library (installed via pip) providing the “Robotic Transformer 2 (RT-2)” vision-language-action model.
• It wraps a pre-trained multi-modal backbone (PALM-E) in a PyTorch module (rt2.model.RT2) so users can feed images+language and get action-token outputs for robotics tasks.
File structure
• Top-level packaging & CI:
• pyproject.toml / requirements.txt → packaging metadata & dependencies
• .github/workflows/python-publish.yml → CI/CD for testing & PyPI publishing
• Core library:
• rt2/__init__.py
• rt2/model.py → defines the RT2 class
• Documentation:
• README.md, docs/*.md → usage, datasets, evaluation, model details
• Tests:
• tests/test.py → sanity check for installation and basic API
• Example:
• example.py → sample client invoking RT2()
README for additional insights
• Describes the multi-modal architecture: Vision encoder + Language backbone → concatenation in a shared embedding space → action-token head.
• Mentions external datasets used in training but no dataset code in this repo.
• Emphasizes inference use case: feed images+captions → get action predictions.
Elements
• Clear labels:
• “User Application”
• “RT2 Library (rt2/model.py)”
• “Vision Encoder (PALM-E vision tower)”
• “Language Encoder (PALM-E language tower)”
• “Fusion Layer”
• “Action Head”
• “PyTorch”
• “CI/CD”
• “PyPI Packaging”
• “Documentation”
• img →Vision Encoder→
• caption →Language Encoder→
• outputs →action head→ action tokens → back to user