Error when running notebook in Google Colab on T4 GPU as is preset

#1
by Solshine - opened

"""
Loading checkpoint shards: 100%
 2/2 [00:00<00:00, 29.79it/s]
WARNING:accelerate.big_modeling:Some parameters are on the meta device because they were offloaded to the cpu and disk.

RuntimeError Traceback (most recent call last)
/tmp/ipython-input-14-3958124575.py in <cell line: 0>()
8
9 expansion_factor = 8 if sae_name == "DeepSeek-R1-Distill-Llama-70B-SAE-l48" else 16
---> 10 sae = SparseAutoencoder.from_pretrained(
11 path=file_path,
12 input_dim=model.config.hidden_size,

9 frames
/usr/local/lib/python3.11/dist-packages/torch/serialization.py in _validate_device(location, backend_name)
598 device_index = device.index if device.index else 0
599 if hasattr(device_module, "is_available") and not device_module.is_available():
--> 600 raise RuntimeError(
601 f"Attempting to deserialize object on a {backend_name.upper()} "
602 f"device but torch.{backend_name}.is_available() is False. "

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
"""

Sign up or log in to comment