Skip to content

Added 4-bit quantization support for local fine-tuning #8107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asad-aali
Copy link

This PR adds optional 4-bit quantization via BitsAndBytesConfig in train_sft_locally within lm_local.py. When use_quantization=True is passed in train_kwargs, the model is loaded in 4-bit (NF4) with double quantization, enabling memory-efficient fine-tuning of LLMs on limited hardware.

@asad-aali asad-aali changed the title Add 4-bit quantization support for local fine-tuning Added 4-bit quantization support for local fine-tuning Apr 25, 2025
@okhat
Copy link
Collaborator

okhat commented Apr 25, 2025

Oh wow, super cool, thanks @asad-aali !! Tagging @Ziems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants