Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提示引用模块不对,我换了好几个版本一直不行 #384

Open
chenlei528884440 opened this issue Mar 18, 2025 · 0 comments
Open

Comments

@chenlei528884440
Copy link

Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:01<00:00, 4.41it/s]
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results.
The seen_tokens attribute is deprecated and will be removed in v4.41. Use the cache_position model input instead.
Traceback (most recent call last):
File "G:\transformers\trains.py", line 28, in
outputs = model.generate(input_tensor.to(model.device), max_new_tokens=100)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\transformers\generation\utils.py", line 2223, in generate
result = self._sample(
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\transformers\generation\utils.py", line 3204, in _sample
model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs)
File "C:\Users\User.cache\huggingface\modules\transformers_modules\deepseek-moe-16b-chat\modeling_deepseek.py", line 1382, in prepare_inputs_for_generation
max_cache_length = past_key_values.get_max_length()
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1928, in getattr
raise AttributeError(
AttributeError: 'DynamicCache' object has no attribute 'get_max_length'. Did you mean: 'get_seq_length'?

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

No branches or pull requests

1 participant