NVIDIA-NeMo / NVIDIA-NeMo/RL

SFT Quickstart Example Fails Without HF Authentication

Open
#1,546 1 comment 0 reactions 0 assignees View on GitHub
bug i-tme t-onbonarding
Dominant language
Python
Stars
2k
Forks
561
Avg merge
4d 5h
Merged PRs (30d)
145

Description

**Describe the bug**
I tried to run [this example](https://docs.nvidia.com/nemo/rl/latest/guides/sft-openmathinstruct2.html#train-the-model) directly using sft_openmathinstruct2.yaml and got this error.

Getting `Traceback (most recent call last):
File "/opt/nemo_rl_venv/lib/python3.12/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/opt/nemo_rl_venv/lib/python3.12/site-packages/requests/models.py", line 1026, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/meta-llama/Llama-3.1-8B/resolve/main/tokenizer_config.json

The above exception was the direct cause of the following exception:
...
`

Running the SFT OpenMathInstruct2 example out-of-the-box fails unless the user is already authenticated with Hugging Face due to the llama model being gated. While [the detailed walkthrough](https://docs.nvidia.com/nemo/rl/latest/guides/sft.html) in the documentation explains how to resolve this by logging into HF, this still causes unexpected friction for users who are trying to quickly run the example without modifying code or environment setup.

**Steps/Code to reproduce bug**
After setting the cluster up, log out of the HF account and rerun `uv run examples/run_sft.py --config=examples/configs/sft_openmathinstruct2.yaml`

**Expected behavior**

the example runs without any code modification

**Additional context**

Suggestion: Add a clear upfront note or a built-in check prompting users to authenticate before running the example, ensuring a smoother quickstart experience.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.