Skip to content

RuntimeError: Unsloth: Quantization failed #835

Closed

Description

@kolomichyk

Hi!
I'm not using Kaggle, but how can I get that exception?
I'm just trying to save gguf model.

model.save_pretrained_gguf("model", tokenizer, quantization_method = "f16")

RuntimeError: Unsloth: Quantization failed for ./model/unsloth.F16.gguf
You are in a Kaggle environment, which might be the reason this is failing.
Kaggle only provides 20GB of disk space. Merging to 16bit for 7b models use 16GB of space.
This means using model.{save_pretrained/push_to_hub}_merged works, but
`model.{save_pretrained/push_to_hub}_gguf will use too much disk space.
I suggest you to save the 16bit model first, then use manual llama.cpp conversion.

Activity

  1. danielhanchen commented on Jul 30, 2024

    @danielhanchen
    Member

    Oh weird my environment variable checking says you're in a Kaggle env - but anyways it just means you don't have enough disk space

  2. danielhanchen commented on Jul 30, 2024

    @danielhanchen
    Member

    Best to save the LoRA adapters, and convert on a larger disk space

  3. kolomichyk commented on Jul 30, 2024

    @kolomichyk
    Author
  4. changed the title [-]RuntimeError: Unsloth: Quantization failed for ./model/unsloth.F16.gguf You are in a Kaggle environment, which might be the reason this is failing. Kaggle only provides 20GB of disk space. Merging to 16bit for 7b models use 16GB of space. This means using `model.{save_pretrained/push_to_hub}_merged` works, but `model.{save_pretrained/push_to_hub}_gguf will use too much disk space. I suggest you to save the 16bit model first, then use manual llama.cpp conversion.[/-] [+]RuntimeError: Unsloth: Quantization failed[/+] on Jul 31, 2024
  5. danielhanchen commented on Jul 31, 2024

    @danielhanchen
    Member

    It's not the Kaggle issue - it just detects you do not have enough disk space to save the 16bit model. But weirdly it also means you have some kaggle keys in the environment vars ie IS_KAGGLE_ENVIRONMENT = "KAGGLE_" in keynames

  6. rolandtannous commented on Oct 23, 2025

    @rolandtannous
    Contributor

    Will be closing this for now as the issue has been resolved. Please make sure to follow the instructions given in my last response.

    Meanwhile , please feel free to respond if you're still having any issues.

    Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions