Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
| matching_group_name = next(name for name, val in match_object.groupdict().items() if val is not None) | ||
| source_pattern_that_matched = self.source_patterns[int(matching_group_name[1:])] | ||
| # If we matched, we always replace with the first target pattern, in case we have several (one to many transform) | ||
| replacement = self.target_patterns[0] |
There was a problem hiding this comment.
in reverse ops, I think we should remove the $ and ^ characters if used as regex patterns in source_patterns (which become target patterns during saving) @Cyrilvallez
There was a problem hiding this comment.
I see! The ^ is already being removed! The correct place to do it is https://github.com/huggingface/transformers/blob/main/src/transformers/core_model_loading.py#L302-L316 those lines 🤗 So we keep all those transforms at the same location
There was a problem hiding this comment.
oh indeed thanks! updated that 👍
| source_patterns=".weight_g$", | ||
| target_patterns=".parametrizations.weight.original0", |
There was a problem hiding this comment.
we need this for fp-quant since it has a param called weight_global_scale that will get replaced if we don't use a $ delimiter in the regex
|
[For maintainers] Suggested jobs to run (before merge) run-slow: gptq, mxfp4 |
* initial commit * update
What does this PR do?
Fixing various Quantization tests