Skip to content

perf: Increase CUDA training microbatch size - #27

Merged
Sau1707 merged 1 commit into
mainfrom
perf/training-microbatches
Nov 10, 2026
Merged

Sau1707 merged 1 commit into
mainfrom
perf/training-microbatches

Conversation

@Sau1707

@Sau1707 Sau1707 commented Nov 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Use batch size 4 and gradient accumulation 1 for CUDA CI training, preserving effective batch size 4 and leaving CPU defaults unchanged.
  • Two real-training runs per configuration measured approximately 0.580 s/step for 1×4, 0.289 s for 2×2, and 0.170 s for 4×1: approximately 3.4× faster steady-state optimizer steps.
  • Batch 4 peak allocated memory remained below 2.4 GB. Total 25-step runtime was 35.2 s on the first run (including a timing spike) and 21.8 s on the second, versus approximately 56 s for batch 1.

Validation

  • 106 training/CI tests passed; Ruff lint/format and git diff checks passed.
  • Six CUDA training runs completed using the same model, data, seed, optimizer, 25 steps, and effective batch size. Twenty steps per run were measured after five warm-up steps.
  • These are performance measurements, not evidence of improved model quality. No model was published during validation.

@Sau1707
Sau1707 merged commit 2087bae into main Nov 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant