Issue evidence · Serve · unslothai/unsloth

unsloth_compiled_module_gemma4 fails to load: name 'transformers' is not defined (zoo 2026.10.3, transformers 5.5.0)

GitHub issue: https://github.com/unslothai/unsloth/issues/13245

Not reproduced

Loading a Gemma 4 model through Unsloth fails at compile/load time with a NameError for 'transformers' in the generated gemma4 module.

What Badgr ran

On an RTX 4090 through Badgr: transformers 5.5.0, unsloth and unsloth_zoo 2026.10.3, caches cleared, then FastVisionModel.from_pretrained on unsloth/gemma-4-E2B-it in 4-bit from plain Python.

What came back

  • The model loaded: Gemma4ForConditionalGeneration, no NameError.

Not the reporter's path: they load through Unsloth Studio's inference subprocess on a Kaggle T4 with Python 3.13, with a Sinhala fine-tune of the base model. This run used plain Python, a 4090 and the unsloth/ mirror, so it does not rule the bug out for Studio.

Checked 2026-10-11 in Badgr’s local development environment.

← All issue evidence