Whole-workspace rustfmt pass picked up while iterating on Mamba GPU backward work. Verified formatting-only via diff sampling; no logic changed. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Gap 1 — GpuViTEncoder + encoder-agnostic JepaTrainerV2 (jepa_gpu.rs, 12 tests): - ExecutionTarget enum (Cpu | Cuda{device_id}); GpuViTEncoder wraps CpuViTEncoder - cuda feature: Arc<CudaDevice> + try_allocate_gpu_buffer() via cudarc - no-cuda: graceful Cpu fallback with correct shapes - JepaTrainerV2 now holds Box<dyn JepaEncoder> + EmaTargetEncoderDyn - new_with_encoder() constructor; JepaTrainerV2::new() backward-compatible - JepaEncoder::l2_normalize gets `where Self: Sized` for dyn-compatibility - 46 existing jepa_vit tests preserved (zero regressions) Gap 4 — Distributed gradient sync (jepa_distributed.rs, 15 tests): - JepaGradSync: single_process / simulated(world_size, rank) / nccl(...) - sync_gradients(): noop at world_size=1; divides grads by world_size (simulated) - effective_batch_size(), is_primary(), barrier() stubs - JepaRunConfig: +world_size/rank/master_addr/master_port fields + TOML parser - run_jepa_training() wired: creates JepaGradSync, syncs after each step, gates logging+checkpointing on is_primary(); summary carries world_size + eff_batch Gap 6 — JEPA eval harness (jepa_eval.rs + examples/jepa_eval.rs, 15 tests): - JepaEvalConfig: feature_dim, num_classes, linear probe + kNN params, seed, mode - EvalMode: LinearProbe / KNN / Both - run_eval_suite(): LCG-generated L2-normalised features → JepaEvaluator dispatch - load_features_txt / load_labels_txt / save_eval_csv (stdlib only) - EvalSuiteResult::summary() and to_csv_row() - examples/jepa_eval.rs: --mode/--dim/--classes/--train/--test/--epochs/--lr/--k --seed/--features/--labels/--test-features/--test-labels/--output CLI flags Co-Authored-By: Claude Sonnet 4.6 <[email protected]>