Added return_token_type_ids=False

#16

Existing sample code gives this error

>>> outputs = model.generate(**inputs, max_new_tokens=20)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/xxxx/path/to/xxx/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/xxxx/path/to/xxx/lib/python3.10/site-packages/transformers/generation/utils.py", line 1686, in generate
    self._validate_model_kwargs(model_kwargs.copy())
  File "/xxxx/path/to/xxx/lib/python3.10/site-packages/transformers/generation/utils.py", line 1242, in _validate_model_kwargs
    raise ValueError(
ValueError: The following `model_kwargs` are not used by the model: ['token_type_ids'] (note: typos in the generate arguments will also show up in this list)
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment