Issue
CONTEXT
I am trying to run llama2 on my local machine.
I have followed the documentation available on the github repository
https://github.com/facebookresearch/llama
thank you in advance for your support
what did I do?
- install anaconda
- clone the llama repository
https://github.com/facebookresearch/llama
download the models
create a virtual environment named llama2
install pytorch on Anaconda
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
- install local components
pip install -e .
- executed the following command line
torchrun
--nproc_per_node 1 example_text_completion.py
--ckpt_dir llama-2-7b-chat/
--tokenizer_path tokenizer.model
--max_seq_len 512 --max_batch_size 6
the error
failed to create process.
Solution
root cause
the error comes from an incorrect-or-missing update of the torchrun-script.py
how to correct the issue
- edit the file
C:\Apps\Anaconda3\envs\[YOUR ENVIRONMENT]\Scripts\torchrun-script.py
- replace the first line with
#!c:\Apps\Anaconda3\envs\[YOUR ENVIRONMENT]\python.exe
- save the file
voilĂ , it works!
Answered By - Abdelkrim
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.