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. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||