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
Can't import unsloth when both the latest version of unsloth and transformers are installed #1179
try to import unsloth, receive error:
/usr/local/lib/python3.10/dist-packages/unsloth/kernels/cross_entropy_loss.py in Unsloth_LlamaForCausalLM()
NameError: name 'Unpack' is not defined
This doesn't affect demo notebooks as they don't import the latest version of transformers. An older version of transformers can be used but doesn't work as well with gradient accumulation and gives the warning "Unsloth: Using our custom gradient accumulation fixed trainer, which is not feature complete."
Activity
Austin1207 commentedon Oct 24, 2024
both
lossflow commentedon Oct 24, 2024
I can no longer repro after 3 attempts. Not sure what was happening.
lossflow commentedon Oct 24, 2024
Repro-ed again.
Erland366 commentedon Oct 24, 2024
Working on a fix!
R4ZZ3 commentedon Oct 24, 2024
I am having the same issue
danielhanchen commentedon Oct 24, 2024
@R4ZZ3 @lossflow Apologies fixed! Please update unsloth on local installations (or reload / restart Colab / Kaggle) -
pip install --upgrade --no-cache-dir unslothurisolve commentedon Oct 25, 2024
I confirm it is working now. Many thanks