Skip to content
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

Adding qlora config for Mistral #675

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Conversation

TokenBender
Copy link
Contributor

Contains fix for Mistral FA issue - ValueError: You are attempting to perform batched generation with padding_side='right' this may lead to unexpected behaviour for Flash Attention version of Mistral. Make sure to call tokenizer.padding_side = 'left' before tokenizing the input.

Fix for now is to set sample_packing: true and pad_to_sequence_len: true

Contains fix for Mistral FA issue - ValueError: You are attempting to perform batched generation with padding_side='right' this may lead to unexpected behaviour for Flash Attention version of Mistral. Make sure to  call tokenizer.padding_side  = 'left' before tokenizing the input.

Fix for now is to set sample_packing: true and pad_to_sequence_len: true
@TokenBender
Copy link
Contributor Author

The workaround can also go in config.yml but I don't think sample_packing: true/pad_to_sequence_len: true should be forced on the default full FT config.

@seungduk-yanolja
Copy link
Contributor

can we just add a config to set padding_side: left?

@NanoCode012
Copy link
Collaborator

The main issue will be fixed in #681 . However, we can still get this config in :)

Copy link
Collaborator

@NanoCode012 NanoCode012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename the file to qlora.yml to follow the same format as others?

@TokenBender
Copy link
Contributor Author

Could you rename the file to qlora.yml to follow the same format as others?

Done

@NanoCode012 NanoCode012 merged commit d4a88e4 into axolotl-ai-cloud:main Oct 6, 2023
mkeoliya pushed a commit to mkeoliya/axolotl that referenced this pull request Dec 15, 2023
* Adding qlora config for Mistral

Contains fix for Mistral FA issue - ValueError: You are attempting to perform batched generation with padding_side='right' this may lead to unexpected behaviour for Flash Attention version of Mistral. Make sure to  call tokenizer.padding_side  = 'left' before tokenizing the input.

Fix for now is to set sample_packing: true and pad_to_sequence_len: true

* Renamed to qlora.yml
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.

None yet

3 participants