Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistake in 191 line if is_speculative=True generate.py ? #213

Open
deafTim opened this issue Oct 23, 2024 · 1 comment
Open

Mistake in 191 line if is_speculative=True generate.py ? #213

deafTim opened this issue Oct 23, 2024 · 1 comment

Comments

@deafTim
Copy link

deafTim commented Oct 23, 2024

Am I right that here is a mistake?
In 191 line generate.py
Because for batch>1 cur_token will have more than 1 element so next_token.view(()) will give an error.

if is_speculative:
        input_pos = input_pos.item()  # for speculative decoding easier to keep on host
        while input_pos < T_new - 1:
            cur_token = next_token.view(())

            next_tokens = speculative_decode(
                model, draft_model, cur_token, input_pos, speculate_k, **sampling_kwargs
            )
@deafTim deafTim changed the title Mistake in generate.py ? Mistake in 191 line in generate.py ? Oct 23, 2024
@deafTim deafTim changed the title Mistake in 191 line in generate.py ? Mistake in 191 line if is_speculative=True generate.py ? Oct 23, 2024
@deafTim
Copy link
Author

deafTim commented Oct 24, 2024

@malfet Could you help, please?

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

No branches or pull requests

1 participant