jepacpp/h-jepa-GGUF

Model

H-JEPA — GGUF for jepa.cpp

0

88 commits

2 linked in READMEs

updated Oct 13, 2026

See the code

README

H-JEPA — GGUF for jepa.cpp

H-JEPA (arXiv 2610.06805, Zhang, Terver, Rabbat, LeCun, Balestriero) trains a hierarchy of action-conditioned JEPA world models end to end: level 1 predicts one step ahead in the latent space of a ViT image encoder, each level above re-encodes every stride-th state of the level below and predicts one of its steps ahead, conditioned on a latent macro-action. These are the authors' released checkpoints (jepa-world-models/h-jepa, code at kevinghst/H-JEPA) converted to GGUF for jepa.cpp, a ggml C/C++ engine with no Python and no PyTorch at run time.

hjepa_l{N} is the N-level H-JEPA, hwm_l{N} the HWM baseline (identity upper encoders), lewm the flat one-level baseline. One seed of every released configuration is here (seed 42 for the simulated environments, seed 1 for DROID).

What runs

The encoder, every level's state encoder, action encoder, predictor and latent rollout, and the paper's top-down gradient planner (jepa_hjepa_* in include/jepa.h; jepa-plan goes from an observation and a goal image to actions).

hf download jepacpp/h-jepa-GGUF ant/ant_hjepa_l3-seed42-f16.gguf --local-dir models/gguf
jepa-plan -m models/gguf/ant/ant_hjepa_l3-seed42-f16.gguf --obs now.png --goal goal.png --horizons 2,2,5 --samples 100,100,400

Parity with the authors' PyTorch

Every file below was checked by test-predictor --hjepa against activations dumped from the authors' own modules (scripts/hjepa_reference.py): encoder tokens, each level's states, latent actions, action embeddings, teacher-forced predictions and autoregressive rollouts, and the whole chain from frames to top-level states. cos min is the worst row cosine over all of those comparisons, rel max the largest max-abs error relative to the reference's largest value.

filelevelssizecos minrel max
ant/ant_hjepa_l2-seed42-f32.gguf294.4 MB1.00000001.3e-06
ant/ant_hjepa_l2-seed42-f16.gguf255.0 MB0.99999103.1e-03
ant/ant_hjepa_l2-seed42-q8_0.gguf236.6 MB0.99331671.1e-01
ant/ant_hjepa_l3-seed42-f32.gguf3139.3 MB1.00000007.7e-07
ant/ant_hjepa_l3-seed42-f16.gguf381.9 MB0.99999811.3e-03
ant/ant_hjepa_l3-seed42-q8_0.gguf355.0 MB0.99833624.8e-02
ant/ant_hjepa_l4-seed42-f32.gguf4184.2 MB1.00000003.1e-06
ant/ant_hjepa_l4-seed42-f16.gguf4108.7 MB0.99999752.4e-03
ant/ant_hwm_l2-seed42-f32.gguf293.3 MB1.00000007.0e-07
ant/ant_hwm_l2-seed42-f16.gguf254.4 MB0.99999978.7e-04
ant/ant_hwm_l2-seed42-q8_0.gguf236.2 MB0.99975842.2e-02
ant/ant_hwm_l3-seed42-f32.gguf3136.9 MB1.00000003.1e-06
ant/ant_hwm_l3-seed42-f16.gguf380.7 MB0.99999772.2e-03
ant/ant_hwm_l3-seed42-q8_0.gguf354.3 MB0.99415257.7e-02
ant/ant_hwm_l4-seed42-f32.gguf4180.6 MB1.00000009.9e-07
ant/ant_hwm_l4-seed42-f16.gguf4107.0 MB0.99999563.3e-03
ant/ant_lewm-seed42-f32.gguf149.6 MB1.00000001.8e-05
ant/ant_lewm-seed42-f16.gguf128.2 MB0.99999821.3e-03
ant/ant_lewm-seed42-q8_0.gguf118.1 MB0.99842763.4e-02
cube/cube_hjepa_l2-seed42-f32.gguf293.0 MB1.00000008.9e-07
cube/cube_hjepa_l2-seed42-f16.gguf252.2 MB0.99999986.8e-04
cube/cube_hjepa_l2-seed42-q8_0.gguf233.1 MB0.99984901.5e-02
cube/cube_hjepa_l3-seed42-f32.gguf3140.8 MB1.00000007.7e-07
cube/cube_hjepa_l3-seed42-f16.gguf379.2 MB0.99999987.2e-04
cube/cube_hjepa_l3-seed42-q8_0.gguf350.4 MB0.99979032.0e-02
cube/cube_hjepa_l4-seed42-f32.gguf4188.6 MB1.00000001.3e-05
cube/cube_hjepa_l4-seed42-f16.gguf4106.3 MB0.99999968.9e-04
cube/cube_hjepa_l4-seed42-q8_0.gguf467.7 MB0.99989701.5e-02
cube/cube_hwm_l2-seed42-f32.gguf292.4 MB1.00000009.3e-07
cube/cube_hwm_l2-seed42-f16.gguf251.9 MB0.99999985.1e-04
cube/cube_hwm_l2-seed42-q8_0.gguf232.9 MB0.99987931.3e-02
cube/cube_hwm_l3-seed42-f32.gguf3139.6 MB1.00000009.2e-07
cube/cube_hwm_l3-seed42-f16.gguf378.6 MB0.99999985.3e-04
cube/cube_hwm_l3-seed42-q8_0.gguf350.1 MB0.99986522.1e-02
cube/cube_hwm_l4-seed42-f32.gguf4186.8 MB1.00000007.3e-07
cube/cube_hwm_l4-seed42-f16.gguf4105.4 MB0.99999961.0e-03
cube/cube_hwm_l4-seed42-q8_0.gguf467.2 MB0.99991451.3e-02
cube/cube_lewm-seed42-f32.gguf145.2 MB1.00000001.5e-06
cube/cube_lewm-seed42-f16.gguf125.1 MB0.99999985.9e-04
cube/cube_lewm-seed42-q8_0.gguf115.7 MB0.99988231.2e-02
fourroom/fourroom_hjepa_l2-seed42-f32.gguf265.9 MB1.00000004.9e-05
fourroom/fourroom_hjepa_l2-seed42-f16.gguf237.7 MB0.99969702.1e-02
fourroom/fourroom_hjepa_l2-seed42-q8_0.gguf224.5 MB0.98850781.1e-01
fourroom/fourroom_hjepa_l3-seed42-f32.gguf386.7 MB1.00000003.3e-05
fourroom/fourroom_hjepa_l3-seed42-f16.gguf350.4 MB0.99998364.4e-03
fourroom/fourroom_hjepa_l4-seed42-f32.gguf4107.6 MB1.00000001.0e-04
fourroom/fourroom_hwm_l2-seed42-f32.gguf265.3 MB1.00000001.7e-05
fourroom/fourroom_hwm_l2-seed42-f16.gguf237.4 MB0.99999123.5e-03
fourroom/fourroom_hwm_l3-seed42-f32.gguf385.6 MB1.00000003.1e-05
fourroom/fourroom_hwm_l3-seed42-f16.gguf349.8 MB0.99998524.7e-03
fourroom/fourroom_hwm_l4-seed42-f32.gguf4105.8 MB1.00000009.0e-05
fourroom/fourroom_hwm_l4-seed42-f16.gguf462.1 MB0.99997637.0e-03
fourroom/fourroom_lewm-seed42-f32.gguf145.1 MB1.00000006.1e-06
fourroom/fourroom_lewm-seed42-f16.gguf125.1 MB0.99998843.9e-03
fourroom/fourroom_lewm-seed42-q8_0.gguf115.7 MB0.99630705.8e-02
pusht/pusht_hjepa_l2-seed42-f32.gguf292.9 MB1.00000001.2e-06
pusht/pusht_hjepa_l2-seed42-f16.gguf252.1 MB0.99999927.2e-04
pusht/pusht_hjepa_l2-seed42-q8_0.gguf233.0 MB0.99943962.1e-02
pusht/pusht_hjepa_l3-seed42-f32.gguf3140.7 MB1.00000001.5e-06
pusht/pusht_hjepa_l3-seed42-f16.gguf379.2 MB0.99999969.0e-04
pusht/pusht_hjepa_l3-seed42-q8_0.gguf350.3 MB0.99963042.3e-02
pusht/pusht_hjepa_l4-seed42-f32.gguf4188.5 MB1.00000001.3e-06
pusht/pusht_hjepa_l4-seed42-f16.gguf4106.2 MB0.99999977.1e-04
pusht/pusht_hjepa_l4-seed42-q8_0.gguf467.7 MB0.99974702.1e-02
pusht/pusht_hwm_l2-seed42-f32.gguf292.3 MB1.00000003.3e-06
pusht/pusht_hwm_l2-seed42-f16.gguf251.8 MB0.99999452.6e-03
pusht/pusht_hwm_l2-seed42-q8_0.gguf232.8 MB0.99822333.6e-02
pusht/pusht_hwm_l3-seed42-f32.gguf3139.5 MB1.00000001.7e-05
pusht/pusht_hwm_l3-seed42-f16.gguf378.6 MB0.99978811.6e-02
pusht/pusht_hwm_l3-seed42-q8_0.gguf350.0 MB0.99693356.5e-02
pusht/pusht_hwm_l4-seed42-f32.gguf4186.7 MB1.00000001.0e-06
pusht/pusht_hwm_l4-seed42-f16.gguf4105.3 MB0.99999976.5e-04
pusht/pusht_hwm_l4-seed42-q8_0.gguf467.2 MB0.99870451.5e-02
pusht/pusht_lewm-seed42-f32.gguf145.1 MB1.00000008.5e-07
pusht/pusht_lewm-seed42-f16.gguf125.1 MB0.99999959.4e-04
pusht/pusht_lewm-seed42-q8_0.gguf115.7 MB0.99965722.1e-02
droid/droid_hjepa_l2-seed1-f32.gguf2345.8 MB1.00000006.6e-07
droid/droid_hjepa_l2-seed1-f16.gguf2217.2 MB0.99999994.2e-04
droid/droid_hjepa_l2-seed1-q8_0.gguf2156.9 MB0.99978981.4e-02
droid/droid_hwm_l2-seed1-f32.gguf2343.4 MB1.00000006.4e-07
droid/droid_hwm_l2-seed1-f16.gguf2216.0 MB0.99999992.1e-04
droid/droid_hwm_l2-seed1-q8_0.gguf2156.3 MB0.99978061.1e-02
droid/droid_lewm-seed1-f32.gguf1215.0 MB1.00000009.2e-07
droid/droid_lewm-seed1-f16.gguf1130.1 MB0.99999974.5e-04
droid/droid_lewm-seed1-q8_0.gguf190.3 MB0.99984261.2e-02

Measured at jepa.cpp 871b994, CPU. Bars: tests/test-predictor.cpp thresholds_for(): f32 cos >= 0.9999 and rel <= 1e-3; f16 cos_mean >= 0.9999, cos_min >= 0.99; q8_0 cos_mean >= 0.999, cos_min >= 0.98. q4_k and below do not clear the q8_0 bars on these small models and are not published.

The planner is checked against the authors' GradientSolver / HierarchicalSolver replayed on their own random draws: at f32 every cost, autograd gradient, solve and hierarchical plan matches, and at f16 every cost and gradient. A q8_0 file is verified as a forward model only; whether it plans as well as f32 has not been measured in closed loop.

Inputs

Frames are squash-resized to the encoder's image size and ImageNet-normalised (jepa.pre.*). Actions and proprioception are z-scored with the training statistics stored in the file (norm.action.*, norm.proprio.*, jepa_hjepa_norm_stats); a level-1 action is jepa.hjepa.frameskip consecutive raw actions stacked.

Licence

MIT, as the source checkpoints (jepa-world-models/h-jepa) and code. Cite the paper:

@article{zhang2026hjepa,
  title   = {H-JEPA: End-to-End Learning of Hierarchical World Models for Visual Planning},
  author  = {Zhang, Wancong and Terver, Basile and Rabbat, Michael and LeCun, Yann and Balestriero, Randall},
  journal = {arXiv preprint arXiv:2610.06805},
  year    = {2026}
}
gguf
h-jepa
jepa
jepa.cpp
planning
robotics
world-models

jepacpp/h-jepa-GGUF

Model

H-JEPA — GGUF for jepa.cpp

0

88 commits

2 linked in READMEs

updated Oct 13, 2026

See the code

README

H-JEPA — GGUF for jepa.cpp

H-JEPA (arXiv 2610.06805, Zhang, Terver, Rabbat, LeCun, Balestriero) trains a hierarchy of action-conditioned JEPA world models end to end: level 1 predicts one step ahead in the latent space of a ViT image encoder, each level above re-encodes every stride-th state of the level below and predicts one of its steps ahead, conditioned on a latent macro-action. These are the authors' released checkpoints (jepa-world-models/h-jepa, code at kevinghst/H-JEPA) converted to GGUF for jepa.cpp, a ggml C/C++ engine with no Python and no PyTorch at run time.

hjepa_l{N} is the N-level H-JEPA, hwm_l{N} the HWM baseline (identity upper encoders), lewm the flat one-level baseline. One seed of every released configuration is here (seed 42 for the simulated environments, seed 1 for DROID).

What runs

The encoder, every level's state encoder, action encoder, predictor and latent rollout, and the paper's top-down gradient planner (jepa_hjepa_* in include/jepa.h; jepa-plan goes from an observation and a goal image to actions).

hf download jepacpp/h-jepa-GGUF ant/ant_hjepa_l3-seed42-f16.gguf --local-dir models/gguf
jepa-plan -m models/gguf/ant/ant_hjepa_l3-seed42-f16.gguf --obs now.png --goal goal.png --horizons 2,2,5 --samples 100,100,400

Parity with the authors' PyTorch

Every file below was checked by test-predictor --hjepa against activations dumped from the authors' own modules (scripts/hjepa_reference.py): encoder tokens, each level's states, latent actions, action embeddings, teacher-forced predictions and autoregressive rollouts, and the whole chain from frames to top-level states. cos min is the worst row cosine over all of those comparisons, rel max the largest max-abs error relative to the reference's largest value.

filelevelssizecos minrel max
ant/ant_hjepa_l2-seed42-f32.gguf294.4 MB1.00000001.3e-06
ant/ant_hjepa_l2-seed42-f16.gguf255.0 MB0.99999103.1e-03
ant/ant_hjepa_l2-seed42-q8_0.gguf236.6 MB0.99331671.1e-01
ant/ant_hjepa_l3-seed42-f32.gguf3139.3 MB1.00000007.7e-07
ant/ant_hjepa_l3-seed42-f16.gguf381.9 MB0.99999811.3e-03
ant/ant_hjepa_l3-seed42-q8_0.gguf355.0 MB0.99833624.8e-02
ant/ant_hjepa_l4-seed42-f32.gguf4184.2 MB1.00000003.1e-06
ant/ant_hjepa_l4-seed42-f16.gguf4108.7 MB0.99999752.4e-03
ant/ant_hwm_l2-seed42-f32.gguf293.3 MB1.00000007.0e-07
ant/ant_hwm_l2-seed42-f16.gguf254.4 MB0.99999978.7e-04
ant/ant_hwm_l2-seed42-q8_0.gguf236.2 MB0.99975842.2e-02
ant/ant_hwm_l3-seed42-f32.gguf3136.9 MB1.00000003.1e-06
ant/ant_hwm_l3-seed42-f16.gguf380.7 MB0.99999772.2e-03
ant/ant_hwm_l3-seed42-q8_0.gguf354.3 MB0.99415257.7e-02
ant/ant_hwm_l4-seed42-f32.gguf4180.6 MB1.00000009.9e-07
ant/ant_hwm_l4-seed42-f16.gguf4107.0 MB0.99999563.3e-03
ant/ant_lewm-seed42-f32.gguf149.6 MB1.00000001.8e-05
ant/ant_lewm-seed42-f16.gguf128.2 MB0.99999821.3e-03
ant/ant_lewm-seed42-q8_0.gguf118.1 MB0.99842763.4e-02
cube/cube_hjepa_l2-seed42-f32.gguf293.0 MB1.00000008.9e-07
cube/cube_hjepa_l2-seed42-f16.gguf252.2 MB0.99999986.8e-04
cube/cube_hjepa_l2-seed42-q8_0.gguf233.1 MB0.99984901.5e-02
cube/cube_hjepa_l3-seed42-f32.gguf3140.8 MB1.00000007.7e-07
cube/cube_hjepa_l3-seed42-f16.gguf379.2 MB0.99999987.2e-04
cube/cube_hjepa_l3-seed42-q8_0.gguf350.4 MB0.99979032.0e-02
cube/cube_hjepa_l4-seed42-f32.gguf4188.6 MB1.00000001.3e-05
cube/cube_hjepa_l4-seed42-f16.gguf4106.3 MB0.99999968.9e-04
cube/cube_hjepa_l4-seed42-q8_0.gguf467.7 MB0.99989701.5e-02
cube/cube_hwm_l2-seed42-f32.gguf292.4 MB1.00000009.3e-07
cube/cube_hwm_l2-seed42-f16.gguf251.9 MB0.99999985.1e-04
cube/cube_hwm_l2-seed42-q8_0.gguf232.9 MB0.99987931.3e-02
cube/cube_hwm_l3-seed42-f32.gguf3139.6 MB1.00000009.2e-07
cube/cube_hwm_l3-seed42-f16.gguf378.6 MB0.99999985.3e-04
cube/cube_hwm_l3-seed42-q8_0.gguf350.1 MB0.99986522.1e-02
cube/cube_hwm_l4-seed42-f32.gguf4186.8 MB1.00000007.3e-07
cube/cube_hwm_l4-seed42-f16.gguf4105.4 MB0.99999961.0e-03
cube/cube_hwm_l4-seed42-q8_0.gguf467.2 MB0.99991451.3e-02
cube/cube_lewm-seed42-f32.gguf145.2 MB1.00000001.5e-06
cube/cube_lewm-seed42-f16.gguf125.1 MB0.99999985.9e-04
cube/cube_lewm-seed42-q8_0.gguf115.7 MB0.99988231.2e-02
fourroom/fourroom_hjepa_l2-seed42-f32.gguf265.9 MB1.00000004.9e-05
fourroom/fourroom_hjepa_l2-seed42-f16.gguf237.7 MB0.99969702.1e-02
fourroom/fourroom_hjepa_l2-seed42-q8_0.gguf224.5 MB0.98850781.1e-01
fourroom/fourroom_hjepa_l3-seed42-f32.gguf386.7 MB1.00000003.3e-05
fourroom/fourroom_hjepa_l3-seed42-f16.gguf350.4 MB0.99998364.4e-03
fourroom/fourroom_hjepa_l4-seed42-f32.gguf4107.6 MB1.00000001.0e-04
fourroom/fourroom_hwm_l2-seed42-f32.gguf265.3 MB1.00000001.7e-05
fourroom/fourroom_hwm_l2-seed42-f16.gguf237.4 MB0.99999123.5e-03
fourroom/fourroom_hwm_l3-seed42-f32.gguf385.6 MB1.00000003.1e-05
fourroom/fourroom_hwm_l3-seed42-f16.gguf349.8 MB0.99998524.7e-03
fourroom/fourroom_hwm_l4-seed42-f32.gguf4105.8 MB1.00000009.0e-05
fourroom/fourroom_hwm_l4-seed42-f16.gguf462.1 MB0.99997637.0e-03
fourroom/fourroom_lewm-seed42-f32.gguf145.1 MB1.00000006.1e-06
fourroom/fourroom_lewm-seed42-f16.gguf125.1 MB0.99998843.9e-03
fourroom/fourroom_lewm-seed42-q8_0.gguf115.7 MB0.99630705.8e-02
pusht/pusht_hjepa_l2-seed42-f32.gguf292.9 MB1.00000001.2e-06
pusht/pusht_hjepa_l2-seed42-f16.gguf252.1 MB0.99999927.2e-04
pusht/pusht_hjepa_l2-seed42-q8_0.gguf233.0 MB0.99943962.1e-02
pusht/pusht_hjepa_l3-seed42-f32.gguf3140.7 MB1.00000001.5e-06
pusht/pusht_hjepa_l3-seed42-f16.gguf379.2 MB0.99999969.0e-04
pusht/pusht_hjepa_l3-seed42-q8_0.gguf350.3 MB0.99963042.3e-02
pusht/pusht_hjepa_l4-seed42-f32.gguf4188.5 MB1.00000001.3e-06
pusht/pusht_hjepa_l4-seed42-f16.gguf4106.2 MB0.99999977.1e-04
pusht/pusht_hjepa_l4-seed42-q8_0.gguf467.7 MB0.99974702.1e-02
pusht/pusht_hwm_l2-seed42-f32.gguf292.3 MB1.00000003.3e-06
pusht/pusht_hwm_l2-seed42-f16.gguf251.8 MB0.99999452.6e-03
pusht/pusht_hwm_l2-seed42-q8_0.gguf232.8 MB0.99822333.6e-02
pusht/pusht_hwm_l3-seed42-f32.gguf3139.5 MB1.00000001.7e-05
pusht/pusht_hwm_l3-seed42-f16.gguf378.6 MB0.99978811.6e-02
pusht/pusht_hwm_l3-seed42-q8_0.gguf350.0 MB0.99693356.5e-02
pusht/pusht_hwm_l4-seed42-f32.gguf4186.7 MB1.00000001.0e-06
pusht/pusht_hwm_l4-seed42-f16.gguf4105.3 MB0.99999976.5e-04
pusht/pusht_hwm_l4-seed42-q8_0.gguf467.2 MB0.99870451.5e-02
pusht/pusht_lewm-seed42-f32.gguf145.1 MB1.00000008.5e-07
pusht/pusht_lewm-seed42-f16.gguf125.1 MB0.99999959.4e-04
pusht/pusht_lewm-seed42-q8_0.gguf115.7 MB0.99965722.1e-02
droid/droid_hjepa_l2-seed1-f32.gguf2345.8 MB1.00000006.6e-07
droid/droid_hjepa_l2-seed1-f16.gguf2217.2 MB0.99999994.2e-04
droid/droid_hjepa_l2-seed1-q8_0.gguf2156.9 MB0.99978981.4e-02
droid/droid_hwm_l2-seed1-f32.gguf2343.4 MB1.00000006.4e-07
droid/droid_hwm_l2-seed1-f16.gguf2216.0 MB0.99999992.1e-04
droid/droid_hwm_l2-seed1-q8_0.gguf2156.3 MB0.99978061.1e-02
droid/droid_lewm-seed1-f32.gguf1215.0 MB1.00000009.2e-07
droid/droid_lewm-seed1-f16.gguf1130.1 MB0.99999974.5e-04
droid/droid_lewm-seed1-q8_0.gguf190.3 MB0.99984261.2e-02

Measured at jepa.cpp 871b994, CPU. Bars: tests/test-predictor.cpp thresholds_for(): f32 cos >= 0.9999 and rel <= 1e-3; f16 cos_mean >= 0.9999, cos_min >= 0.99; q8_0 cos_mean >= 0.999, cos_min >= 0.98. q4_k and below do not clear the q8_0 bars on these small models and are not published.

The planner is checked against the authors' GradientSolver / HierarchicalSolver replayed on their own random draws: at f32 every cost, autograd gradient, solve and hierarchical plan matches, and at f16 every cost and gradient. A q8_0 file is verified as a forward model only; whether it plans as well as f32 has not been measured in closed loop.

Inputs

Frames are squash-resized to the encoder's image size and ImageNet-normalised (jepa.pre.*). Actions and proprioception are z-scored with the training statistics stored in the file (norm.action.*, norm.proprio.*, jepa_hjepa_norm_stats); a level-1 action is jepa.hjepa.frameskip consecutive raw actions stacked.

Licence

MIT, as the source checkpoints (jepa-world-models/h-jepa) and code. Cite the paper:

@article{zhang2026hjepa,
  title   = {H-JEPA: End-to-End Learning of Hierarchical World Models for Visual Planning},
  author  = {Zhang, Wancong and Terver, Basile and Rabbat, Michael and LeCun, Yann and Balestriero, Randall},
  journal = {arXiv preprint arXiv:2610.06805},
  year    = {2026}
}
gguf
h-jepa
jepa
jepa.cpp
planning
robotics
world-models