Urgent help needed on Llama2 Authentication on Colab

I’m using AutoTrain-Advanced from Colab. The model I’m using is Llama2 which I have already requested access from Meta and was granted access and HF model indicate the same. When I run the training in colab with Token, it will run for about 30% and finally give and error. The following is a sample of the trace.

Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-2-7b-chat-hf/resolve/main/config.json .
Repo model meta-llama/Llama-2-7b-chat-hf is gated. You must be authenticated to access it.

have you logged in using notebook login method

thanks for the response, Yes I’m using the following command which includes the authentication username and token.

!autotrain llm --train --project-name test1 --model abhishek/llama-2-7b-hf-small-shards --data-path . --use-peft --lr 2e-4 --auto_find_batch_size --epochs 3 --trainer sft --add_eos_token --text_column text --quantization int8 --model_max_length 2048 --block_size 2048 --merge_adapter –username userName --token xxxxxx

i think you must have to login first using

from huggingface_hub import notebook_login

notebook_login() and paste your token and also you must get acess to the model first on llama repo

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.