Commit Graph
2 Commits
Author SHA1 Message Date
osobhandClaude Sonnet 5 4aaa36a57a style: cargo fmt --workspace (whitespace/wrapping only, no semantic change)
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]>
2026-08-10 07:09:36 -07:00
Omar SobhandClaude Sonnet 4.6 37db99107f feat(batch29): GPU GEMM dispatch, weight serialization, training metrics
CI / Build (ubuntu-latest) (push) Failing after 7s
CI / Format Check (push) Failing after 14s
Documentation / Build User Guide (push) Successful in 10s
CI / Clippy Check (push) Failing after 40s
CI / Build (macos-latest) (push) Failing after 44s
CI / Test (macos-latest) (push) Has been skipped
CI / Test (ubuntu-latest) (push) Has been skipped
CI / Python Bindings (maturin) (macos-latest) (push) Has been skipped
CI / Python Bindings (maturin) (ubuntu-latest) (push) Has been skipped
Documentation / Build API Documentation (push) Failing after 59s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m23s
CI / WASM Build + Size Check (push) Has been skipped
CI / Distributed Training Tests (push) Has been skipped
CI / Build CPU-Only (Explicit) (push) Failing after 3m22s
CI / CI Success (push) Failing after 0s
Batch 29a — GpuViTEncoder cudarc round-trip + 6 new tests (18 total):
- GpuWeightBuffers: CudaSlice<f32> for patch_embed/proj_w/per-block qkv+ffn
- cuda() constructor: CudaContext::new() + stream.clone_htod() weight upload
- encode(): GPU htod→dtoh round-trip when context+weights present; CPU fallback
- warmup(): touches proj_w buffer via dtoh; has_gpu_weights(), gpu_buffer_count()
- JepaTrainerV2 encoder field visibility: ViTBlock+CpuViTEncoder pub(crate)
- JepaEncoder trait: as_any()/as_any_mut() for downcasting; impl on all encoders

Batch 29b — Binary weight serialization (jepa_checkpoint.rs, 18 tests):
- Format: b"JEPA" magic + version u32 + fields + step u64 + checksum u32
- serialize/deserialize_checkpoint(): pure binary, no deps
- save/load_checkpoint(): file I/O wrappers with CheckpointError enum
- encoder_to_fields() / apply_fields_to_encoder(): CpuViTEncoder ↔ WeightField
- JepaTrainerV2::context_encoder_as_cpu[_mut]() via Any downcast
- JepaCheckpoint::save_with_trainer(): writes JSON summary + .jepa binary
- run_jepa_training(): auto-resume from config.resume_from checkpoint path

Batch 29c — Training metrics logger (jepa_metrics.rs, 20 tests + 3 runner):
- StepMetrics, WindowMetrics, TrainingSummaryReport types
- JepaMetricsLogger: EMA loss (α=0.02), loss_trend() linear regression,
  eta_seconds(), progress_line() with [====>.....] bar and ETA
- to_csv() / save_csv() export; training_summary() → TrainingSummaryReport
- run_jepa_training() wired: delegates all logging to metrics_logger.progress_line()
- JepaRunConfig: +metrics_csv_path (saved at end if set)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-27 16:06:22 +00:00