-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
After loading the 8bit model I am facing the following issue:
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████| 3/3 [00:14<00:00, [28/1000$
Human: asd
/home/sadmin/miniconda3/envs/pa/lib/python3.10/site-packages/transformers/generation/utils.py:1201: UserWarning: You have modi
fied the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be
removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/m
ain_classes/text_generation)
warnings.warn(
Traceback (most recent call last):
File "/home/sadmin/point-alpaca/chat.py", line 102, in <module>
go()
File "/home/sadmin/point-alpaca/chat.py", line 72, in go
generated_ids = generator(
File "/home/sadmin/miniconda3/envs/pa/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_contex
t
return func(*args, **kwargs)
File "/home/sadmin/miniconda3/envs/pa/lib/python3.10/site-packages/transformers/generation/utils.py", line 1452, in generate
return self.sample(
File "/home/sadmin/miniconda3/envs/pa/lib/python3.10/site-packages/transformers/generation/utils.py", line 2504, in sample
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0
What I tried so far:
quantization_config = BitsAndBytesConfig(
llm_int8_threshold=1.0,
)
as a variable, then
quantization_config=quantization_config to model = transformers.LLaMAForCausalLM.from_pretrained([...]).cuda{}
Also tried to just passllm_int8_threshold=1.0to the loader - both ways it loads the model, but at generation I have another error:
return self._apply(lambda t: t.cuda(device))
NotImplementedError: Cannot copy out of meta tensor; no data!
Hardware: RTX 3060 12GB, Ryzen 5700X, 24GB RAM
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels