Skip to content

quantize: improve pattern matching for allowed tensors #13033

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 6 commits into
base: master
Choose a base branch
from

Conversation

EAddario
Copy link
Contributor

This PR implements @slaren's regex matching recommendation for allowed tensors. For example: --tensor-type attn=q4_k will now apply to all tensors named *attn*

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
@EAddario
Copy link
Contributor Author

EAddario commented May 3, 2025

Apologies for shotgun approach @ggerganov / @slaren / @ngxson, I'm not sure what the proper process to request a review is. This PR addresses #12511 deficiencies. Happy to close or move to draft if it's not suitable for merging

Copy link
Member

@slaren slaren left a comment

Choose a reason for hiding this comment

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

My opinion is still that it would be better to remove all checks and just accept any regex that the user wants to use.

@@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h"
#include "llama-quant.h"
Copy link
Member

Choose a reason for hiding this comment

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

We should avoid including private headers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update as suggested

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

Successfully merging this pull request may close these issues.

None yet

2 participants