unsloth/studio/backend/core/training
Daniel Han 401621618b
fix(studio): don't set trust_remote_code for Gemma 4 training (#4795)
Gemma 4 is a native transformers 5.5 model and does not need
trust_remote_code=True. The auto-enable logic (added for NemotronH)
was catching all transformers 5.x models, including Gemma 4.

When trust_remote_code=True, unsloth_compile_transformers() returns
early without running the compiler. This disables the fused cross
entropy patch, causing logged training loss to be inflated by the
gradient_accumulation_steps factor.

Exclude models matching "gemma-4" or "gemma4" from the auto-enable
so the compiler runs and applies fused cross entropy correctly.
2026-04-02 11:44:26 -07:00
..
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
trainer.py fix(studio): correct default weight_decay and learning rate (#4695) 2026-03-31 13:50:25 +04:00
training.py fix(studio): correct default weight_decay and learning rate (#4695) 2026-03-31 13:50:25 +04:00
worker.py fix(studio): don't set trust_remote_code for Gemma 4 training (#4795) 2026-04-02 11:44:26 -07:00