Refactor - #21
Open
khanhnd61-vr wants to merge 21 commits into
Open
Conversation
…tions stop aborting
…an be bisected across builds
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.
Refactor report - layer/module/model split
refactor, commits87a7e8f..04df961; llama.cpp pinned atb10331libero_object, 10 tasks x 10 episodes = 100 episodes per model,via
eval/run_libero.sh -n 10tests/predict_checkwith fixed images / language / state / noise,VLA_BENCH_ITERS=20, minimum of 20 timedpredict()calls after 3 warmupsThe refactor's contract was that no model's output moves by a bit. That was
enforced continuously rather than checked at the end:
eval/refactor_verify.shruns every arch against its real checkpoint at two precisions and diffs the
action chunk against the pre-refactor bytes, and it was re-run after each of the
eleven commits. Every one passed.
Results
bitvlagr00t_n1_5gr00t_n1_7openvla_oftpi05vla_adapterevo1smolvlagr00t_n1_6pi0vla_jepaNo episode was skipped mid-step on any model (0/100 across the board).
vla_jepahas no success rate because the LIBERO client cannot drive it.The SR column is measured at each model's shipping defaults, not at the
flags in the "fastest" column.
How to run each model at its fastest
Every performance switch is now a
vla-serverflag. The per-arch environmentvariables that used to carry them (
VLA_GR00T_BF16_WEIGHTS,VLA_PI0_FA,VLA_SMOLVLA_FA,VLA_MM_PREC, ...) are retired, and setting one is a hardload failure with a message naming its replacement - a silently-ignored switch
would let a benchmark measure a configuration nobody asked for.
smolvla--flash-attn --mm-prec defaultpi0--act-dtype bf16 --flash-attnevo1--act-dtype bf16 --flash-attngr00t_n1_5VLA_GR00T_EMBODIMENT=new_embodimentgr00t_n1_6VLA_GR00T_EMBODIMENT=libero_pandagr00t_n1_7pi05bitvla--weight-dtype bf16vla_adapteropenvla_oftvla_jepa./build/vla-server --bind tcp://*:5555 \ --act-dtype bf16 --flash-attn \ /path/to/pi0-libero-finetuned-v044.ggufSeven of eleven models need no flags at all: their fastest configuration is now
the default. The full option list is in
vla-server --help; the same keys areaccepted in the
"runtime"object of the config JSON passed to--config.VLA_GR00T_EMBODIMENTselects normalization statistics, not speed - the wrongvalue produces wrong actions rather than slower ones. It is also available as
--embodiment.Refactoring the source tree
src/models/held eleven self-contained files that each re-derived the samepieces. The three levels are now:
src/layers/src/modules/src/models/predictDeduplicated:
build_dit_block(4 copies → 1),SigLipLayerW(5 →EncBlockW),Qwen3LayerW(4 →Qwen3LM),ViTLayerW/MergerW(2 →Qwen3VLTower), theDINOv2+SigLIP declaration (2 →
DualTower), and all eleven copies of themk/mk_mm/mk_f32+ok &= a&&b&&c+ upload-loop pattern (→WeightLoader).src/models/went from ~9,600 to ~8,400 lines while gaining ~1,150 lines ofshared
src/layers/+src/modules/.Reproducing
Two traps worth knowing. Rebuilding while a sweep runs relinks
libvla_core.sounderneath it and every remaining arch fails to load with"file too short" - which reads like a regression and is not one. And a failed
build leaves the previous binary in place, so a verify run can pass against
stale code; check the compiler's error count before trusting a result.