Skip to content

Commit

Permalink
add setter of max_new_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tohtana committed Jan 29, 2024
1 parent 7bc17c2 commit 467d768
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mii/batching/data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ def min_new_tokens(self) -> int:
def max_new_tokens(self) -> int:
return self.generate_params.max_new_tokens

@max_new_tokens.setter
def max_new_tokens(self, max_new_tokens: int) -> None:
self.generate_params.max_new_tokens = max_new_tokens

@property
def stream(self) -> bool:
return self.generate_params.stream
Expand Down

0 comments on commit 467d768

Please sign in to comment.