OSError: yandex/YandexGPT-5-Lite-8B-pretrain is not a local folder and is not a valid model identifier listed on 'https://huggingface.co./models'
#6
by
sobir-hf
- opened
Can't run example code in Google Colab.
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_NAME = "yandex/YandexGPT-5-Lite-8B-pretrain"
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, legacy=False)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
device_map="cuda",
torch_dtype="auto",
)
input_text = "Кто сказал тебе, что нет на свете настоящей,"
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=18)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py in hf_raise_for_status(response, endpoint_name)
405 try:
--> 406 response.raise_for_status()
407 except HTTPError as e:
15 frames
HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co./yandex/YandexGPT-5-Lite-8B-pretrain/resolve/main/tokenizer_config.json
The above exception was the direct cause of the following exception:
RepositoryNotFoundError Traceback (most recent call last)
RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-67bdf11e-60a40af52c45dd4c2817d8dd;4272bb27-f491-4ccc-9083-684534301f97)
Repository Not Found for url: https://huggingface.co./yandex/YandexGPT-5-Lite-8B-pretrain/resolve/main/tokenizer_config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid credentials in Authorization header
The above exception was the direct cause of the following exception:
OSError Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py in cached_file(path_or_repo_id, filename, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)
363 ) from e
364 except RepositoryNotFoundError as e:
--> 365 raise EnvironmentError(
366 f"{path_or_repo_id} is not a local folder and is not a valid model identifier "
367 "listed on 'https://huggingface.co./models'\nIf this is a private repository, make sure to pass a token "
OSError: yandex/YandexGPT-5-Lite-8B-pretrain is not a local folder and is not a valid model identifier listed on 'https://huggingface.co./models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`
SOLVED.
This error disappeared once I deleted my huggingface token from Colab.
sobir-hf
changed discussion status to
closed