Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/neuronx_distributed/scripts/checkpoint_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def download_and_save_hf_model(self, model_identifier, output_path="/home/ubuntu

from transformers import AutoModelForCausalLM

token = getpass("Enter your Hugging Face API token: (If you don't have one, create it at https://huggingface.co/settings/tokens): ")
token = os.getenv("HF_TOKEN", None)
if token is None:
token = getpass("Enter your Hugging Face API token: (If you don't have one, create it at https://huggingface.co/settings/tokens): ")
login(token=token)

print(f"Downloading model: {model_identifier}")
Expand Down