fix tokenizer overrides w gemma3 (#2488)

* fix tokenizer overrides w gemma3

* fix offline wrapping
This commit is contained in:
Wing Lian
2025-04-05 01:25:44 -04:00
committed by GitHub
parent de451f99a5
commit 949471039f
4 changed files with 48 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ def hf_offline_context(hf_hub_offline):
"""
original_hf_offline = os.getenv("HF_HUB_OFFLINE")
os.environ["HF_HUB_OFFLINE"] = str(hf_hub_offline)
reload_modules(True)
reload_modules(bool(hf_hub_offline))
yield
# Restore the original value of HF_HUB_OFFLINE environment variable
if original_hf_offline is not None: