Skip to content

[Bug] Offline GGUF export still broken after #7218 – VLM processor triggers hidden network call (is_base_mistral) #7481

Closed

Description

@RadaVRada

After PR #7218 training and f16 export work offline, thanks. But GGUF export — no. It's the same problem as in my #6817: the code ignores the local cache and tries to hit the network.

I'm not a programmer, but I can see the problem is identical. You fixed is_embedding_model(), and now another function makes a network call when loading the VLM processor.

My system and environment

  • Unsloth Studio v0.1.501-beta
  • OS: Windows
  • GPU: NVIDIA RTX 5090
  • Test model: llmfan46/gemma-4-E4B-it-ultra-uncensored-heretic

Qwen advised me to launch Unsloth like this:

@echo off
set HF_HUB_OFFLINE=1
set TRANSFORMERS_OFFLINE=1
set HF_DATASETS_OFFLINE=1
set HF_HUB_DOWNLOAD_TIMEOUT=1
set HF_HUB_ETAG_TIMEOUT=1

call "C:\Users\User\.unsloth\studio\unsloth_studio\Scripts\activate.bat"

unsloth studio

pause

That solved the training problem.

What works

  • Training (offline) — no issues.
  • Export to f16 (offline) — also fine.
  • Export to NVFP4 doesn't work at all, but that's a different problem.
  • With internet, GGUF export works (see logs).

What breaks
Export to any GGUF (tried q4_k_m, q3_k_m) with no internet fails instantly:

Error exporting GGUF model: Unsloth: GGUF conversion failed: Unsloth: `C:\Users\User\.unsloth\studio\exports\llmfan46_gemma-4-E4B-it-ultra-uncensored-heretic_1785106256-GGUF\_tmp_model_2557bb2a` does not exist?

The temporary folder isn't even created. Before the crash the logs show:

Unsloth: Warning - VLM processor fallback returned None for model_type=gemma4
Unsloth: The tokenizer is weirdly not loaded? Please check if there is one.

And the full traceback points to transformers.tokenization_utils_tokenizers.is_base_mistral(), which calls model_info(model_id). That thing goes to the network, ignores TRANSFORMERS_OFFLINE, and without internet crashes with a connection error. That kills the entire GGUF export.

All model files are in the cache, here's the contents of C:\Users\User\.cache\huggingface\hub\models--llmfan46--gemma-4-E4B-it-ultra-uncensored-heretic\snapshots\5964fe4c7339c5974e879baba8982a09616f68ca:

chat_template.jinja
config.json
generation_config.json
model.safetensors
processor_config.json
README.md
tokenizer.json
tokenizer_config.json

Everything is in place, but the code acts like it doesn't even look there.

I'm attaching the logs — the first attempt (with internet) succeeds, and the very next one without internet crashes, exactly like in #6817.

Why this is critical
If tomorrow in some country the internet is cut off or Hugging Face gets blocked, that's it — GGUF export becomes impossible. That immediately kills the ability to train LLMs through Unsloth Studio for many people.

Link to the previous issue
#6817 – same story: offline checks ignored the cache. You fixed the embedding classification, but forgot about is_base_mistral() in the VLM pipeline.

@danielhanchen @hakanbaysal please take a look.

EXPORT GGUF.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions