Skip to content
Merged
Show file tree
Hide file tree
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: 2 additions & 2 deletions scripts/performance/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def slurm_executor(
"""
PERF_ENV_VARS = {
"TORCH_NCCL_AVOID_RECORD_STREAMS": "1", # Disable caching NCCL communication buffer memory
"TRANSFORMERS_OFFLINE": "1", # Enable online downloads from HuggingFace
"HF_HUB_OFFLINE": "1", # Enable online downloads from HuggingFace
"TOKENIZERS_PARALLELISM": "False", # Restrict warning message prints
"NCCL_NVLS_ENABLE": "0", # Disable NVLink SHARP to save memory
"NVTE_FLASH_ATTN": "1", # Enable Flash Attention, which is needed to enable cuDNN fused attention
Expand Down Expand Up @@ -104,7 +104,7 @@ def slurm_executor(
PERF_ENV_VARS["NEMO_HOME"] = nemo_home
mounts.extend([f"{nemo_home}:{nemo_home}"])
if hf_token is not None:
PERF_ENV_VARS.update({"HF_TOKEN": hf_token, "TRANSFORMERS_OFFLINE": "0"})
PERF_ENV_VARS.update({"HF_TOKEN": hf_token, "HF_HUB_OFFLINE": "0"})

PERF_ENV_VARS |= custom_env_vars
mounts.extend(custom_mounts)
Expand Down
2 changes: 1 addition & 1 deletion scripts/performance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def hf_tokenizer(model_name: str) -> run.Config[AutoTokenizer]:
f"`AutoTokenizer` first searches for tokenizer files locally stored in {DEFAULT_NEMO_HOME}.",
"(from env var `NEMO_HOME`- can be changed using '-nh/--nemo_home' CLI arg).",
"If files are missing locally, `AutoTokenizer` will try downloading from HuggingFace. In this case-",
"make sure env vars 'TRANSFORMERS_OFFLINE':'0' and 'HF_TOKEN':'<token_value>' are set in your sbatch script.",
"make sure env vars 'HF_HUB_OFFLINE':'0' and 'HF_TOKEN':'<token_value>' are set in your sbatch script.",
"Both of these will be set automatically if you provide '-hf/--hf_token' CLI arg.",
]
logging.warning(" ".join(log_msg))
Expand Down
Loading