Skip to content

Commit

Permalink
feat(debug): add env var to skip warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
tengomucho committed Sep 18, 2024
1 parent 4265e13 commit c897a7f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import time
from enum import Enum
import os
from typing import List, Optional, Tuple

import jax
Expand Down Expand Up @@ -330,6 +331,9 @@ def warmup(self, batch: Batch) -> int:
# Counter-intuitively, now we ignore the input batch. Instead, we create dummy batches to cover all possible
# batch sizes and sequence lengths.
seq_len = self.model.config.sequence_length
if os.environ.get("SKIP_WARMUP", "0") == "1":
logger.debug("Skipping warmup")
return batch_size * seq_len
bucket_seq_len = take_nearest_length(DEFAULT_PREFILL_BUCKETS, seq_len)
decode_done = False
for l in reversed(DEFAULT_PREFILL_BUCKETS):
Expand Down

0 comments on commit c897a7f

Please sign in to comment.