Open krsnnik opened 1 year ago
I have the same issue. I tried reducing the batch_size, but it's not helping.
I have the same issue.
$ pip install -e .
$ torchrun --nproc_per_node 1 example_chat_completion.py \ at 08:09:59
--ckpt_dir llama-2-7b-chat/ \
--tokenizer_path tokenizer.model \
--max_seq_len 512 --max_batch_size 4
$ torchrun --nproc_per_node 1 example_text_completion.py \ ✘ INT at 08:12:29
--ckpt_dir llama-2-7b/ \
--tokenizer_path tokenizer.model \
--max_seq_len 128 --max_batch_size 4
I could fix my issue using lower max_seq_len. hope this helps.
Thank you! what was your set max_seq_len
?
it is also occured error..
torchrun --nproc_per_node 1 example_text_completion.py \
--ckpt_dir llama-2-7b/ \
--tokenizer_path tokenizer.model \
--max_seq_len 10 --max_batch_size 4
I was using 512, which was throwing the error; with 256, it's working fine. Also, note that you can limit the number of prompts you have in the input. In the default template, there are four prompts if I'm correct. You can reduce that to only one example if you have a smaller GPU. The whole point of the error is batches that cannot be fitted on GPU, so playing around with mentioned parameters can help prevent the issue.
Thank you. but It doesn't work for me :( There seems to be a lot of related issues, so I'm watching this issue..!
same error, and reduce max_seq_len to 128 not work.
I have solved it with a cpu installation by installing this : https://github.com/krychu/llama
instead of https://github.com/facebookresearch/llama
Complete process to install :
https://github.com/facebookresearch/llama
and extract it to a llama-main
folderhttps://github.com/krychu/llama
and extract it and replace files in the llama-main
folderdownload.sh
script in a terminal, passing the URL provided when prompted to start the downloadllama-main
folderpython3 -m venv env
and activate it : source env/bin/activate
python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu #pour la version cpu
python3 -m pip install -e .
torchrun --nproc_per_node 1 example_text_completion.py \
--ckpt_dir llama-2-7b/ \
--tokenizer_path tokenizer.model \
--max_seq_len 128 --max_batch_size 1 #(instead of 4)
Tried 128 as well and did not work, Also tried to reduce max_batch_size down to 1, also did not work, same RuntimeError: probability tensor contains either inf, nan or element < 0
error
Running into the same error. Tried changing batch size and max_seq_len but neither worked
Increasing the max_batch_size to >4 works. I set it to 6
and it works.
torchrun --nproc_per_node 1 example_text_completion.py \ --ckpt_dir llama-2-7b/ \ --tokenizer_path tokenizer.model \ --max_seq_len 128 --max_batch_size 1
I've solved this error by setting the “max_batch_size” to a multiple of the number of prompts
Same error here, nothing seems to work
i trying to run Llama3 model 8B got this issue -
(llama3chatbot) C:\Users\prath\llama3-main>torchrun --nproc_per_node 1 example_chat_completion.py \ --ckpt_dir Meta-Llama-3-8B/ \ --tokenizer_path tokenizer .model \ --max_seq_len 128 --max_batch_size 1 failed to create process.
it showing failed to process . whats the issue ? help!!
python 3.8 PyPi running on a nvidia rtx 3900