add unsloth/nvidia namespace guard to Nemotron trust_remote_code auto-enable
This commit is contained in:
parent
b9e147dcd9
commit
5ae3bfb0a6
2 changed files with 10 additions and 2 deletions
|
|
@ -328,7 +328,11 @@ def _handle_load(backend, config: dict, resp_queue: Any) -> None:
|
|||
trust_remote_code = config.get("trust_remote_code", False)
|
||||
if not trust_remote_code:
|
||||
model_name = config["model_name"]
|
||||
if "nemotron" in model_name.lower():
|
||||
_mn_lower = model_name.lower()
|
||||
if (
|
||||
"nemotron" in _mn_lower
|
||||
and (_mn_lower.startswith("unsloth/") or _mn_lower.startswith("nvidia/"))
|
||||
):
|
||||
trust_remote_code = True
|
||||
logger.info(
|
||||
"Auto-enabled trust_remote_code for Nemotron model: %s",
|
||||
|
|
|
|||
|
|
@ -506,7 +506,11 @@ def run_training_process(
|
|||
# (Qwen3.5, Gemma 4, etc.) are native and do NOT need it — enabling it
|
||||
# bypasses the compiler (disabling fused CE).
|
||||
_lowered = model_name.lower()
|
||||
if "nemotron" in _lowered and not config.get("trust_remote_code", False):
|
||||
if (
|
||||
"nemotron" in _lowered
|
||||
and (_lowered.startswith("unsloth/") or _lowered.startswith("nvidia/"))
|
||||
and not config.get("trust_remote_code", False)
|
||||
):
|
||||
config["trust_remote_code"] = True
|
||||
logger.info(
|
||||
"Auto-enabled trust_remote_code for Nemotron model: %s",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue