You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e-readability-summarization/src/inference$ python run_2.py
Traceback (most recent call last):
File "/home/surenoobster/Documents/project/src/inference/run_2.py", line 87, in
output = generator.generate(
^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/anaconda3/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/Documents/project/src/inference/generation_2.py", line 572, in generate
stopping_criteria = self.model._get_stopping_criteria(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/anaconda3/lib/python3.12/site-packages/transformers/generation/utils.py", line 1126, in _get_stopping_criteria
if generation_config._eos_token_tensor is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GenerationConfig' object has no attribute '_eos_token_tensor'
Who can help?
No response
Information
The official example scripts
My own modified scripts
Tasks
An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
My own task or dataset (give details below)
Reproduction
I'm not able to get it , getting problem with device
Expected behavior
The Generator should initialize the required token tensors correctly to ensure compatibility with GenerationMixin and avoid errors.
The text was updated successfully, but these errors were encountered:
The attributes like _eos_token_tensor were added for torch.compile compatibility and are created on-the-fly when calling generate(). Since in your code you are using private generation methods for custom code, I'd recommend you to call this mthod just before preparing stopping criteria
System Info
e-readability-summarization/src/inference$ python run_2.py
Traceback (most recent call last):
File "/home/surenoobster/Documents/project/src/inference/run_2.py", line 87, in
output = generator.generate(
^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/anaconda3/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/Documents/project/src/inference/generation_2.py", line 572, in generate
stopping_criteria = self.model._get_stopping_criteria(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/surenoobster/anaconda3/lib/python3.12/site-packages/transformers/generation/utils.py", line 1126, in _get_stopping_criteria
if generation_config._eos_token_tensor is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GenerationConfig' object has no attribute '_eos_token_tensor'
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I'm not able to get it , getting problem with device
Expected behavior
The Generator should initialize the required token tensors correctly to ensure compatibility with GenerationMixin and avoid errors.
The text was updated successfully, but these errors were encountered: