New iteration on convert HF, fix some models, support Qwen3/Qwen3MoE #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We'll probably never have a perfect solution to handle every HF cases, but it doesn't hurt to keep rationalizing a few things.
Addressed topics
Some notes:
while testing this, I checked Mixtral quickly, and it appears to have been broken for a while (even before previous refactoring); not sure if we'll fix this here or laterEDIT: MoE (Mixtral/Qwen3) seems fine after a few patches but AWQ is not -- though deprecated so not sure we want to dive back into it (might be better off investigating llm-compressor which replaces it)Did not test all architectures yet (e.g. gpt2/nllb/xlmroberta)EDIT: only XLM-roberta not fully testedtransformer decoder refactoring a while ago introduced post_attention_layernorm, which should probably be made optional (e.g. phi-2)EDIT: introducedpost_attention_layernorm
flag (defaultTrue
)