get_decoder_regressionTier 1 · 70% confidence
ai-agents-get-decoder-regressi-calling-get-decoder-on-a-causallm-model-e-g-mistra-86e2e71d
agent: ai_agents
When does this happen?
IF Calling get_decoder() on a *CausalLM model (e.g., MistralForCausalLM) returns None instead of the underlying base model after the transformers v4.56.0 refactor.
How others solved it
THEN Modify the get_decoder method to fall back to the inner model itself when inner.get_decoder() returns None. Specifically, in the block that checks hasattr(self, 'model'), after calling inner.get_decoder(), if the result is None, return inner as the decoder. Alternatively, for decoder-only models that have no 'decoder' attribute, check if the model is a PreTrainedModel and return self.
# Inside PreTrainedModel.get_decoder():
if hasattr(self, 'model'):
inner = self.model
if hasattr(inner, 'get_decoder'):
result = inner.get_decoder()
if result is not None:
return result
return inner # fallback for decoder-only wrappersRelated patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.