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
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jiqingfe/transformers/src/transformers/models/auto/auto_factory.py", line 564, in from_pretrained
return model_class.from_pretrained(
File "/home/jiqingfe/transformers/src/transformers/modeling_utils.py", line 271, in _wrapper
return func(*args, **kwargs)
File "/home/jiqingfe/transformers/src/transformers/modeling_utils.py", line 4535, in from_pretrained
dispatch_model(model, **device_map_kwargs)
File "/home/jiqingfe/accelerate/src/accelerate/big_modeling.py", line 496, in dispatch_model
model.to(device)
File "/home/jiqingfe/transformers/src/transformers/modeling_utils.py", line 3262, in to
return super().to(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1343, in to
return self._apply(convert)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 903, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 930, in _apply
param_applied = fn(param)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1336, in convert
raise NotImplementedError(
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.
Expected behavior
Expect got a base model.
The text was updated successfully, but these errors were encountered:
System Info
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
transformers
version: 4.50.0.dev0- distributed_type: MULTI_CPU
- mixed_precision: bf16
- use_cpu: True
- debug: False
- num_processes: 4
- machine_rank: 0
- num_machines: 4
- main_process_ip: 127.0.0.1
- main_process_port: 29500
- rdzv_backend: static
- same_network: True
- main_training_function: main
- enable_cpu_affinity: False
- ipex_config: {'ipex': False}
- mpirun_config: {'mpirun_ccl': '1', 'mpirun_hostfile': '/home/jiqingfe/jiqing_hf/HuggingFace/tests/workloads/fine-tune/hostfile'}
- downcast_bf16: no
- tpu_use_cluster: False
- tpu_use_sudo: False
- tpu_env: []
Who can help?
@SunMarc @ArthurZucker @Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Run the following codes:
Error:
Expected behavior
Expect got a base model.
The text was updated successfully, but these errors were encountered: