Skip to content

Instantly share code, notes, and snippets.

@wassname
Last active November 10, 2025 12:34
Show Gist options
  • Select an option

  • Save wassname/356c24d5c886163bf13751a72fcb7980 to your computer and use it in GitHub Desktop.

Select an option

Save wassname/356c24d5c886163bf13751a72fcb7980 to your computer and use it in GitHub Desktop.
problem: model.generate does not return input logprobs, solution `model.forward`, then `model.generate(past_key_values)`, also get logprobs on the last token of a stopping sequences
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment