mirror of
https://github.com/deepseek-ai/DeepSeek-V3.git
synced 2026-11-05 00:47:48 +00:00
[GH-ISSUE #290] [BUG] Fail to import is_torch_greater_or_equal_than_1_13 since transformers v4.48.0 for all deepseek models #109
Labels
No labels
closed-as-stale
enhancement
question
spam
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-V3#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yuxianq on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V3/issues/290
Describe the bug
Fail to import
is_torch_greater_or_equal_than_1_13since transformers v4.48.0 for all deepseek modelsTo Reproduce
Install transformers v4.48.0 and run any deepseek model.
Expected behavior
Can run deepseek models with transformers v4.48.0.
Additional context
is_torch_greater_or_equal_than_1_13has been removed since transformers v4.48.0, it is necessary to remove all usage ofis_torch_greater_or_equal_than_1_13from all deepseek models, not only this one. Can the maintainers help to fix all the models? It is important for us to provide deepseek model support in TensorRT-LLM. Thanks~@enochkan commented on GitHub (Jan 25, 2025):
@yuxianq hi can you provide your python version please?
@cmiqueo commented on GitHub (Jan 26, 2025):
@enochkan I have the same problem:
An error occurred: cannot import name 'is_torch_greater_or_equal_than_1_13' from 'transformers.pytorch_utils' (/Users/username/.pyenv/versions/myenv/lib/python3.9/site-packages/transformers/pytorch_utils.py)
Python 3.9.20
@mowentian commented on GitHub (Jan 26, 2025):
@Jiadalee commented on GitHub (Jan 27, 2025):
Only python 3.10 working? I have python 3.12 and tried transformers 4.37.2 and 4.48.0, but still pops with the same error.
@yuxianq commented on GitHub (Feb 3, 2025):
Sorry that I am still on vocation.
@mowentian I use Python 3.12.3. Please noting that this issue is not about Python version but HF version instead. HF removes is_torch_greater_or_equal_than_1_13 in https://github.com/huggingface/transformers/pull/35358/files#diff-dba11d4c8294d6ccc1f120918ba0921738444244db666e0bbde15dc9eb212128L38 since v4.48.0, which breaks deepseek's modeling files.
One way to fix it is removing the usage of is_torch_greater_or_equal_than_1_13 from your model checkpoints. Another way is to integrate deepseek models into HF. There is an ongoing effort: https://github.com/huggingface/transformers/issues/35425 , it would help a lot if you can provide official support for them.
@dinithaw commented on GitHub (Feb 3, 2025):
3.10 as far i can remember