feat(policies): add Smolvla torch compile support#3043
Merged
Conversation
Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com>
Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com>
Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com>
Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional torch.compile acceleration to the SmolVLA policy, aligning it with existing compile support patterns used by other policies in lerobot.policies.
Changes:
- Introduces
compile_modelandcompile_modefields toSmolVLAConfig. - Compiles
VLAFlowMatching.sample_actionsandVLAFlowMatching.forwardwhencompile_model=True, and sets matmul precision to"high".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/lerobot/policies/smolvla/modeling_smolvla.py |
Adds optional torch.compile wrapping for inference (sample_actions) and training (forward) paths. |
src/lerobot/policies/smolvla/configuration_smolvla.py |
Adds config flags to enable/parameterize compilation for SmolVLA. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1 task
xianglunkai
pushed a commit
to xianglunkai/lerobot
that referenced
this pull request
Feb 28, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
sorelferris
pushed a commit
to sorelferris/lerobot
that referenced
this pull request
Mar 1, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
LePao1
pushed a commit
to LePao1/lerobot
that referenced
this pull request
Mar 7, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
lu391see
pushed a commit
to lu391see/lerobot_tactile
that referenced
this pull request
Mar 24, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
zouxiaochuan
pushed a commit
to magic-visual-plus/lerobot
that referenced
this pull request
May 20, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
gro-lazar
pushed a commit
to gro-lazar/lerobot
that referenced
this pull request
Jun 2, 2026
* Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Change LIBERO init_state_id when reset. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * pre-commit run * Add torch.compile for smolvla Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * Add torch.compile for smolvla Add model compilation option for improved performance. Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> * first --------- Signed-off-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Aoqun Jin <aojiaojiao@foxmail.com> Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
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.
Title
feat(policies): add Smolvla torch compile support
Supersedes #3004