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
num_return_sequences: RuntimeError in unsloth/models/llama.py #120
No worries. I really can't emphasize enough how helpful that DPO notebook has been in getting started doing experiments with the technique. Big thanks for that.
Update Unsloth only with pip install --upgrade --force-reinstall --no-cache-dir git+https://github.com/unslothai/unsloth.git
(Edit: When this happens and doesn't happen is more subtle than I thought. It can still happen on the old commit. I still need to sort that out.)
(Edit 2: Please disregard this comment in favor of the issue: #144.)
It seems that num_return_sequences may have broken again since my previous comment. (I haven't made a repro yet, but I'm guessing the cause might be obvious since you've been working in the area recently. Please let me know if you want more details.) Instead of an error, it's just giving nonsense output when num_return_sequences is 2 or larger.
# Output is sensible when num_return_sequences=1
[('<|system|>\nYou are a helpful chatbot that assists teachers.</s> \n<|user|>\nPlease write a simple middle school algebra problem in which the student must solve for a variable.</s> \n<|assistant|>\n',
'Solve for x: 2x + 3 = 7\n\nTo solve for x, we need to isolate the variable on one side of the equation. \n\nFirst, we can subtract 3 from both sides of the equation to get:\n\n2x = 4\n\nNow, we can divide both sides by 2 to get:\n\nx = 2\n\nTherefore, the solution to the equation is x = 2.')]
# Output is nonsense when num_return_sequences=2
[('<|system|>\nYou are a helpful chatbot that assists teachers.</s> \n<|user|>\nPlease write a simple middle school algebra problem in which the student must solve for a variable.</s> \n<|assistant|>\n',
'Science math problem-level math problem solving math problem solving a script for me a science experiment that is an English, and easy for a program for me a comprehensive guide on how-level chatbot: Can you are you are we use a.'),
('<|system|>\nYou are a helpful chatbot that assists teachers.</s> \n<|user|>\nPlease write a simple middle school algebra problem in which the student must solve for a variable.</s> \n<|assistant|>\n',
'Sci science experiment with math lesson plan for a story that is the lesson plan for me with the chatbot: Can you program that introductions for \n')]
The bad output was observed in commit 05624642802c7f90dcc7aeea0e1c8d447cde006e.
I observed good output in commit 1ecc0185a5759c7a0c95dfc96aceea5023cebdfc.
Activity
danielhanchen commentedon Jan 23, 2024
@malcolmsharpe WHOOPS I was working to make inference 2x faster, but I accidentally forgot about multi batched inference
Stopwolf commentedon Jan 23, 2024
Maybe this helps, and maybe not.. but I get the same error even though I don't use
num_return_sequences. What I do is the following:Seems that in this case,
num_beamsproduces this errordanielhanchen commentedon Jan 23, 2024
@Stopwolf Ye my bad - I'm working on a fix to both - should be fixed by today! Extreme apologies again!
malcolmsharpe commentedon Jan 23, 2024
No worries. I really can't emphasize enough how helpful that DPO notebook has been in getting started doing experiments with the technique. Big thanks for that.
danielhanchen commentedon Jan 24, 2024
@malcolmsharpe Thanks! Ok taking a bit longer than I expected to fix things - hopefully by today!
danielhanchen commentedon Jan 26, 2024
FINALLY it works yikes so so sorry @malcolmsharpe and @Stopwolf on the issue.
danielhanchen commentedon Jan 26, 2024
Update Unsloth only with
pip install --upgrade --force-reinstall --no-cache-dir git+https://github.com/unslothai/unsloth.gitmalcolmsharpe commentedon Jan 27, 2024
Thanks, it works now.
malcolmsharpe commentedon Jan 29, 2024
(Edit: When this happens and doesn't happen is more subtle than I thought. It can still happen on the old commit. I still need to sort that out.)
(Edit 2: Please disregard this comment in favor of the issue: #144.)
It seems thatnum_return_sequencesmay have broken again since my previous comment. (I haven't made a repro yet, but I'm guessing the cause might be obvious since you've been working in the area recently. Please let me know if you want more details.) Instead of an error, it's just giving nonsense output whennum_return_sequencesis 2 or larger.The bad output was observed in commit05624642802c7f90dcc7aeea0e1c8d447cde006e.I observed good output in commit
1ecc0185a5759c7a0c95dfc96aceea5023cebdfc.danielhanchen commentedon Jan 30, 2024
@malcolmsharpe I'll check on it!!!
Merge pull request unslothai#120 from unslothai/fix/back-on-complete