You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Llama-3.1-8B Not Supported in Unsloth 2024.09.post2 #2503
When attempting to load meta-llama/Llama-3.1-8B with Unsloth version 2024.09.post2, I receive a NotImplementedError stating that the model is not supported and suggesting an upgrade to the latest Unsloth version. However, upgrading Unsloth is not feasible in my environment due to strict transformers version constraints..
Is there a known workaround for this issue, or an official compatibility matrix for Unsloth and transformers versions? Since my training runs inside a managed SageMaker Docker container, I am unable to patch the package source code directly (as suggested in #1726).
Any advice for resolving this without upgrading Unsloth or transformers would be greatly appreciated. Thank you!
Unsloth requires a transformers version that your current environment doesn't allow. If the older transformers version that your container forces doesn't support the model you wish to train, then unsloth, which uses transformers can't equally support that same model. This then looks like an environment problem to me since it's easily solveable in an environment where you can update the packages to latest.
@rolandtannous@shimmyshimmer Thanks for the suggestions! I’ll try them out and see how it goes. BTW, I ran into this issue while following the llm-twin-course.
Will share any updates if I find a workaround!
Hallo, I hope you've found resolution for this?!? I am also doing the book and it led me here. Cheers,
Sorry, I haven't fully resolved it yet 🥹. The main issue seems to be that the Docker environment provided in the book is now outdated and not fully compatible with unsloth and the model. I think the proper way to fix it is to build a custom SageMaker Docker container to ensure everything matches up.
@rolandtannous@shimmyshimmer Thanks for the suggestions! I’ll try them out and see how it goes. BTW, I ran into this issue while following the llm-twin-course.
Will share any updates if I find a workaround!
Hallo, I hope you've found resolution for this?!? I am also doing the book and it led me here. Cheers,
Sorry, I haven't fully resolved it yet 🥹. The main issue seems to be that the Docker environment provided in the book is now outdated and not fully compatible with unsloth and the model. I think the proper way to fix it is to build a custom SageMaker Docker container to ensure everything matches up.
That message is an upgrade prompt from 2024.09.post2, Llama-3.1-8B resolves fine on current versions. The container's pinned transformers is what's holding you back.
Please update Unsloth: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens!
Activity
shimmyshimmer commentedon May 9, 2025
Is it possible to just comment it out and see if it works?
rolandtannous commentedon May 9, 2025
@stzoozz
Unsloth requires a transformers version that your current environment doesn't allow. If the older transformers version that your container forces doesn't support the model you wish to train, then unsloth, which uses transformers can't equally support that same model. This then looks like an environment problem to me since it's easily solveable in an environment where you can update the packages to latest.
Here for example. Works completely fine
Your solution is to solve your environment problem:
1- Either use an environment other than SageMaker
2- Use a custom SageMaker docker container where you can specify your own packages at build time. This is how to do it https://docs.aws.amazon.com/sagemaker/latest/dg/docker-containers-adapt-your-own.html
stzoozz commentedon May 9, 2025
@rolandtannous @shimmyshimmer Thanks for the suggestions! I’ll try them out and see how it goes.
BTW, I ran into this issue while following the llm-twin-course.
Will share any updates if I find a workaround!
github-actions commentedon Jul 1, 2025
Is this issue still important to you? Apologies in advance we might have missed this issue as well. For faster response times, please post on our Reddit server - https://www.reddit.com/r/unsloth or our Discord - https://discord.com/invite/unsloth
mariotalavera commentedon Jul 4, 2025
Hallo, I hope you've found resolution for this?!? I am also doing the book and it led me here. Cheers,
stzoozz commentedon Jul 5, 2025
Sorry, I haven't fully resolved it yet 🥹. The main issue seems to be that the Docker environment provided in the book is now outdated and not fully compatible with unsloth and the model. I think the proper way to fix it is to build a custom SageMaker Docker container to ensure everything matches up.
mariotalavera commentedon Jul 5, 2025
Thanks! I opened a bug on book's repo for visibility. PacktPublishing/LLM-Engineers-Handbook#57.
danielhanchen commentedon Sep 6, 2026
That message is an upgrade prompt from 2024.09.post2, Llama-3.1-8B resolves fine on current versions. The container's pinned transformers is what's holding you back.
Please update Unsloth:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Reopen if it still happens!ROCm: pack hybrid models by default when flash varlen passes its self…