GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix saving 4bit for VLM by Erland366 · Pull Request #2381 · unslothai/unsloth

Conversation

@Erland366

@Erland366 Erland366 commented Apr 19, 2025

Copy link
Copy Markdown
Collaborator

Saving 4bit model in VLM currently not handled since if we're using VLM, then we're using unsloth_generic_save which is using merge_and_overwrite_lora.

Previously, save_method from unsloth_generic_save is not used at all in merge_and_overwrite_lora. Now we use it and use merge_and_unload method from PEFT to merge the weight

One issue that I found is that many VLM models of Unsloth uses Dynamic quantization, but we throw that config when loading using FastModel, therefore we need to reconstruct it again by manually looping through the model (this is in unsloth-zoo)

We also added test_unsloth_save for easy check in the future.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Erland366
feat: Add validation for 4bit save method and implement corresponding…
c1155dc
… error handling
@Erland366 Erland366 mentioned this pull request Apr 19, 2025
Fix/saving vlm 4bit unslothai/unsloth-zoo#117
Merged
@Erland366

Erland366 commented Apr 19, 2025

Copy link
Copy Markdown
Collaborator Author

Support PR for the zoo -> unslothai/unsloth-zoo#117

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shimmyshimmer
shimmyshimmer merged commit 6c234d5 into unslothai:main Apr 19, 2025
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
@shimmyshimmer
Merge pull request unslothai#2381 from Erland366/fix/saving_vlm_4bit
31a37cb
Fix saving 4bit for VLM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Erland366 @shimmyshimmer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.