Skip to content

'torch' has no attribute 'uint64' #33

@Wisley1998

Description

@Wisley1998

Hi, I follow the official guide to setup environment. However, after setting up and try the "autoregressive decoding" demo , it went error:

Traceback (most recent call last):
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1968, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/opt/conda/envs/layer_skip/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 27, in <module>
    from ...cache_utils import Cache, DynamicCache, StaticCache
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/transformers/cache_utils.py", line 11, in <module>
    from transformers.pytorch_utils import is_torch_greater_or_equal_than_2_6
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/transformers/pytorch_utils.py", line 22, in <module>
    from safetensors.torch import storage_ptr, storage_size
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/safetensors/torch.py", line 439, in <module>
    torch.uint64: 8,
  File "/opt/conda/envs/layer_skip/lib/python3.10/site-packages/torch/__init__.py", line 1938, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'torch' has no attribute 'uint64'

Seems that the PyTroch version in the requirements.txt is outdated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions