Skip to content

fix: compatibility with transformers >= 5 and support non-llama models in chat plugin#171

Merged
wejoncy merged 3 commits into
mainfrom
fix/compat-transformers5-and-chat-plugin
Mar 4, 2026
Merged

fix: compatibility with transformers >= 5 and support non-llama models in chat plugin#171
wejoncy merged 3 commits into
mainfrom
fix/compat-transformers5-and-chat-plugin

Conversation

@wejoncy

@wejoncy wejoncy commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Changes

  1. quant_frame_base.py: Add __getattr__ to Catcher to proxy wrapped module attributes (e.g. attention_type for Qwen3), fixing AttributeError during input hijacking.

  2. base.py: Add _no_init_weights() fallback context manager for transformers >= 5 where transformers.modeling_utils.no_init_weights was removed.

  3. inference.py: Enable chat_loop_v3 for non-llama models that have apply_chat_template support.

wejoncy added 3 commits March 4, 2026 09:46
…s in chat plugin

1. Catcher: add __getattr__ to proxy wrapped module attributes (e.g.
   attention_type for Qwen3), fixing AttributeError during input hijacking.
2. base.py: add _no_init_weights() fallback for transformers >= 5 where
   no_init_weights was removed.
3. inference.py: enable chat_loop_v3 for non-llama models with
   apply_chat_template support.
@wejoncy wejoncy merged commit 661d976 into main Mar 4, 2026
2 checks passed
@wejoncy wejoncy deleted the fix/compat-transformers5-and-chat-plugin branch March 4, 2026 13:22
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.

1 participant