File size: 1,785 Bytes
90fbfa4
2259f33
90fbfa4
 
 
 
 
 
 
 
 
 
 
 
 
d98001b
90fbfa4
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Traceback (most recent call last):
  File "/tmp/PowerInfer_SmallThinker-4BA0.6B-Instruct_1ieOiRI.py", line 12, in <module>
    model = AutoModel.from_pretrained("PowerInfer/SmallThinker-4BA0.6B-Instruct", trust_remote_code=True, torch_dtype="auto"),
            ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.cache/uv/environments-v2/bd16417a146fcbf6/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 582, in from_pretrained
    model_class = get_class_from_dynamic_module(
        class_ref, pretrained_model_name_or_path, code_revision=code_revision, **hub_kwargs, **kwargs
    )
  File "/tmp/.cache/uv/environments-v2/bd16417a146fcbf6/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 582, in get_class_from_dynamic_module
    return get_class_in_module(class_name, final_module, force_reload=force_download)
  File "/tmp/.cache/uv/environments-v2/bd16417a146fcbf6/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 277, in get_class_in_module
    module_spec.loader.exec_module(module)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/tmp/.cache/huggingface/modules/transformers_modules/PowerInfer/SmallThinker-4BA0.6B-Instruct/a24932bb880c85c04c794283202a9194b1b42709/modeling_smallthinker.py", line 16, in <module>
    from transformers.utils import LossKwargs, can_return_tuple, logging
ImportError: cannot import name 'LossKwargs' from 'transformers.utils' (/tmp/.cache/uv/environments-v2/bd16417a146fcbf6/lib/python3.13/site-packages/transformers/utils/__init__.py)