Skip to content

Commit

Permalink
Merge pull request #1145 from AI-Hypercomputer:forward_test
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712660725
  • Loading branch information
maxtext authors committed Jan 6, 2025
2 parents d9c68b1 + 065e716 commit 46bad98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MaxText/pyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def validate_model_call_mode(s: str) -> None:
def validate_prefill_and_target_lengths(max_prefill_length: int, max_target_length: int) -> None:
if max_prefill_length <= 0:
raise ValueError(f"Invalid max_prefill_predict_length {max_prefill_length}, it should be a positive number")
if max_target_length <= max_prefill_length:
if max_target_length < max_prefill_length:
# valid max_target_length = max_prefill_length for existing logit checks
raise ValueError(
f"Invalid max_target_length {max_target_length}, this should be sum of "
f"max_prefill_predict_length ({max_prefill_length}) and max output length expected."
Expand Down

0 comments on commit 46bad98

Please sign in to comment.