feat: rewrite Pi0, enable loading pretrained weights and validate the performance#237
Merged
kwangneuraco merged 1 commit intomainfrom Feb 4, 2026
Merged
feat: rewrite Pi0, enable loading pretrained weights and validate the performance#237kwangneuraco merged 1 commit intomainfrom
kwangneuraco merged 1 commit intomainfrom
Conversation
Contributor
|
Consider updating changelogs/pending-changelog.md with a summary of this change for the release notes. This is optional and non-blocking. |
e4fa450 to
937c968
Compare
77c8d94 to
8f4c492
Compare
Stephen is on holiday and we already discussed how to improve the code and get the code in
1fa530d to
00a9f5b
Compare
bc76422 to
9bb7513
Compare
stepjam
requested changes
Feb 4, 2026
a406581 to
5c88a4a
Compare
…rk well, refactor code
5c88a4a to
5d31c1f
Compare
kwangneuraco
added a commit
that referenced
this pull request
Feb 4, 2026
…rk well, refactor code (#237)
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.
Features
This is a total rewrite of PI0 based on the official code from Physical Intelligence https://github.com/Physical-Intelligence/openpi. The official code has a lot of difference with our previous version ( How VLM and action expert interact, learning scheduler, gradient checkpoint to save VRAM etc) so I did a total rewrite based on the official code. At the same time I made the code interface same as our other algorithms and made several improvements.
Main features from the original code beside the main pi0 model structure:
Features I added:
__init__.pyto automatically replace transformers library, instead of manually copy and paste as suggested by PIrequirements.txtto use numpy >= 2.0 instead of 1.0 from the official codeQuestions from me:
pi0.pyand put it inmodlue.pyand created a class callPI0PolicyandPI0PolicyConfig. This makes the code cleaner and better structured (otherwise pi0.py may have 2k lines) but created a bit of repeated code.trainsformers_replaceandgemma_pytorch.pyinside PI0, although these parts are same for PI05.Validation
Finetune with vx300 for 3 epochs and achieves 70% success rate
Ticket
https://neuracore.atlassian.net/browse/NCRL-33