unsloth/studio/backend/core
Roland Tannous 737017a511 fix(studio): lazy-import extract_model_size_b in llama_cpp to fix transformers 5.x version switch
PR #4769 (e4d14992) added a module-level `from utils.models import
extract_model_size_b` to llama_cpp.py.  Since core/inference/__init__.py
eagerly imports llama_cpp, the spawn subprocess now hits:

  core.inference.__init__  →  llama_cpp  →  utils.models  →
  model_config (line 8: `from transformers import AutoConfig`)

…before _activate_transformers_version() has a chance to prepend
.venv_t5/ to sys.path.  Python caches transformers 4.57.6 in
sys.modules, and no subsequent sys.path change can override it.

Fix: replace the eager import with a thin wrapper that defers the
import to first call.  This breaks the transitive chain so
transformers is not loaded until after version activation.
2026-04-02 21:42:56 +00:00
..
data_recipe build(deps): bump oxc-parser (#4571) 2026-03-25 02:44:38 -07:00
export studio: add HF/local model selection UI for GGUF export (#4365) 2026-03-28 22:18:25 +04:00
inference fix(studio): lazy-import extract_model_size_b in llama_cpp to fix transformers 5.x version switch 2026-04-02 21:42:56 +00:00
training fix(studio): don't set trust_remote_code for Gemma 4 training (#4795) 2026-04-02 11:44:26 -07:00
__init__.py Combine studio setup fixes: frontend caching, venv isolation, Windows CPU support (#4413) 2026-03-18 03:52:25 -07:00