Skip to content

Qwen2.5 does not support Qlora? #2153

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

Closed
mathCrazyy opened this issue Dec 12, 2024 · 3 comments
Closed

Qwen2.5 does not support Qlora? #2153

mathCrazyy opened this issue Dec 12, 2024 · 3 comments
Assignees
Labels
discussion Start a discussion enhancement New feature or request

Comments

@mathCrazyy
Copy link

I can't use qlora_qwen2_5_3b , and didn't find the qlora in lora_qwen2_5_0_5b, lora_qwen2_5_14b_base, lora_qwen2_5_14b_instruct, lora_qwen2_5_1_5b_base, lora_qwen2_5_1_5b_instruct, lora_qwen2_5_32b_base, lora_qwen2_5_32b_instruct, lora_qwen2_5_3b, lora_qwen2_5_72b_base, lora_qwen2_5_72b_instruct, lora_qwen2_5_7b_base, lora_qwen2_5_7b_instruct, qwen2_5_0_5b, qwen2_5_14b_base, qwen2_5_14b_instruct, qwen2_5_1_5b_base, qwen2_5_1_5b_instruct, qwen2_5_32b_base, qwen2_5_32b_instruct, qwen2_5_3b, qwen2_5_72b_base, qwen2_5_72b_instruct, qwen2_5_7b_base, qwen2_5_7b_instruct, qwen2_5_tokenizer,

@joecummings
Copy link
Contributor

It definitely does support QLoRA, we just didn't add it b/c we didn't see an immediate use-case for quantizing models that were already so small. However, enabling it is as simple as the following code snippet:

# This will tell the builder to quantize the base model into NF4Tensors
qlora_qwen2_5_3b = partial(lora_qwen2_5_3b, quantize_base=True) 

And if you want to contribute this to the library, I'd be happy to look over a PR.

@joecummings joecummings added the discussion Start a discussion label Dec 12, 2024
@joecummings joecummings self-assigned this Dec 12, 2024
@joecummings joecummings added the enhancement New feature or request label Dec 12, 2024
@felipemello1
Copy link
Contributor

I think that in the config you can do

tune run <recipe> --config <my_config> model.quantize_base=True

I didn't test it, but i dont see why it wouldnt work

@ebsmothers
Copy link
Contributor

As @felipemello1 mentioned, this is supported directly from the CLI by setting model.quantize_base=True when running any of the Qwen 2.5 recipes. So I am gonna mark this as resolved. @mathCrazyy please feel free to reopen if you encounter any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Start a discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants