Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/inference-deployments/mpt/mpt_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
class MPTModelHandler():

DEFAULT_GENERATE_KWARGS = {
'max_length': 256,
'max_length': 256, # Counts input + output tokens (deprecated)
'max_new_tokens': 256, # Only counts output tokens
'use_cache': True,
'do_sample': True,
'top_p': 0.95,
Expand Down Expand Up @@ -76,7 +77,7 @@ def predict(self, model_requests: List[Dict]):
model_requests: List of dictionaries that contain forward pass inputs as well
as other parameters, such as generate kwargs.

ex. [{'input': 'hello world!', 'parameters': {'max_length': 10}]
ex. [{'input': 'hello world!', 'parameters': {'max_new_tokens': 10}]
"""
generate_inputs = []
generate_kwargs = {}
Expand Down