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

Add logits processor to spec gen #1260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add logits processor to spec gen #1260

wants to merge 1 commit into from

Conversation

awni
Copy link
Member

@awni awni commented Feb 8, 2025

Closes #1255

@awni awni force-pushed the logits_processor branch from 729c0d0 to a915eb0 Compare February 8, 2025 04:42
prev_tokens, logits[:, i : i + 1, :]
)
out_y.append(y)
out_logprobs.append(logprobs)
Copy link
Member Author

@awni awni Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unrolling here is a bit unfortunate.. but the logits processors can be autoregressive themselves (e.g. the repetition_penalty).

@awni awni force-pushed the logits_processor branch from a915eb0 to a5af8a1 Compare February 8, 2025 05:22
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

Successfully merging this pull request may close these issues.

[mlx_lm] Use logits_processors in speculative_generate_step
1 participant