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
{{ message }}
Repository navigation
RuntimeError: User specified an unsupported autocast device_type 'meta' #684
Hi for some reason it says I need access? When you load in 4 bit = False, you will consume a lot more VRAM so the notebook may have gone out of memory causing this error.
@shimmyshimmer We're encountering the same issue when trying to load 2 models with 4bit=False, even when ran in separate processes. Seems like some memory issues.
Below is a full traceback:
Exception in thread Thread-4 (_fast_generate):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/root/venv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/venv/lib/python3.11/site-packages/unsloth/models/llama.py", line 1406, in _fast_generate
with torch.autocast(device_type = device_type, dtype = dtype):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/venv/lib/python3.11/site-packages/torch/amp/autocast_mode.py", line 241, in __init__
raise RuntimeError(
RuntimeError: User specified an unsupported autocast device_type 'meta'
This happens after model is loaded and tries to perform inference on the prompt.
loading a model with load_in_4bit=False, will load it in 16bit.For an 8b model that's slightly around 15GB of VRAM that the T4 colab has. You will either get thrown a runtime error while loading the model or when trying to run inference or training. either pick a smaller model or use load_in_4bit=True.
meta usually means it tried to offload to system RAM
Activity
shimmyshimmer commentedon Jun 26, 2024
Hi for some reason it says I need access? When you load in 4 bit = False, you will consume a lot more VRAM so the notebook may have gone out of memory causing this error.
VanDavv commentedon Oct 11, 2024
@shimmyshimmer We're encountering the same issue when trying to load 2 models with
4bit=False, even when ran in separate processes. Seems like some memory issues.Below is a full traceback:
This happens after model is loaded and tries to perform inference on the prompt.
ilyes1999 commentedon Dec 12, 2024
was anyone able to solve this? it happened to me with load_in_4bit = True
nnakshat commentedon Feb 8, 2025
Did anybody resolve this issue? I am facing the same error during inference time.
rolandtannous commentedon Jun 6, 2025
@nnakshat @VanDavv @brand17 @ilyes1999
loading a model with load_in_4bit=False, will load it in 16bit.For an 8b model that's slightly around 15GB of VRAM that the T4 colab has. You will either get thrown a runtime error while loading the model or when trying to run inference or training. either pick a smaller model or use load_in_4bit=True.
meta usually means it tried to offload to system RAM
Re-trigger staging CI on PR head c7a0956d / bff5b44
Re-trigger staging CI on PR head 0753b115 / bff5b44
Re-trigger staging CI on round-3 final heads (PR unslothai#684 23751c…
Extend macOS MLX smoke with a real-runtime multi-epoch reseed check
macOS smoke: assert SGD/Muon/Lion HF parity decay + VLM prompt maskin…
Update SGD decay check for the coupled-decay design from PR unslothai…