fix: cap auto batch_size at 8192 — prevents 2M+ nonsense on H100
AutoBatchSizer computes raw VRAM ceiling which can be millions on 80GB. Cap at 8192: saturates H100 132 SMs for our GEMM sizes (80x256x128), diminishing returns above this for DQN gradient quality. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ impl DQNTrainer {
|
||||
|
||||
// batch_size == 0 -> auto-compute from VRAM (no artificial cap)
|
||||
if hyperparams.batch_size == 0 {
|
||||
hyperparams.batch_size = max_safe_batch;
|
||||
hyperparams.batch_size = max_safe_batch.min(8192);
|
||||
info!("AutoBatchSizer: batch_size auto-computed to {}", hyperparams.batch_size);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ impl DQNTrainer {
|
||||
"DQN batch_size capped from {} -> {} (VRAM ceiling)",
|
||||
hyperparams.batch_size, max_safe_batch
|
||||
);
|
||||
hyperparams.batch_size = max_safe_batch;
|
||||
hyperparams.batch_size = max_safe_batch.min(8192);
|
||||
}
|
||||
|
||||
// Use override device if provided (hyperopt shares one CUDA context),
|
||||
|
||||
Reference in New Issue
Block a user