Skip to content

Conversation

@Nexround
Copy link

solving issue: #2270

…ce model

- Fix TypeError when max_out_len is None in arithmetic operations
- Add proper None checking in _single_generate and _batch_generate methods
- Use default values: 0 for max_length calculations, 512 for max_new_tokens
- Update type annotations from int to Optional[int] for max_out_len parameter
- Update docstrings to reflect the Optional[int] type change

Fixes: TypeError: unsupported operand type(s) for 'int' and 'NoneType'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants