Spaces:
Paused
Paused
Commit ·
ee5ddee
1
Parent(s): e9dea07
Hackathon speedrun: max_new_tokens=32, seq_len=512 for 4-8x faster iterations
Browse files
cloud_arena/llm_training.py
CHANGED
|
@@ -28,8 +28,8 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 28 |
|
| 29 |
# ── GPU Optimization Constants ────────────────────────────────────────────────
|
| 30 |
GRAD_ACCUM_STEPS = 4 # accumulate gradients over N episodes before stepping
|
| 31 |
-
MAX_SEQ_LEN =
|
| 32 |
-
MAX_GEN_TOKENS =
|
| 33 |
|
| 34 |
|
| 35 |
def format_prompt(state_dict):
|
|
|
|
| 28 |
|
| 29 |
# ── GPU Optimization Constants ────────────────────────────────────────────────
|
| 30 |
GRAD_ACCUM_STEPS = 4 # accumulate gradients over N episodes before stepping
|
| 31 |
+
MAX_SEQ_LEN = 512 # shorter context = O(N²) attention is 4× faster than 1024
|
| 32 |
+
MAX_GEN_TOKENS = 32 # force brief output — just need the ACTION line, not essays
|
| 33 |
|
| 34 |
|
| 35 |
def format_prompt(state_dict):
|