-
Couldn't load subscription status.
- Fork 0
[#SAMPLE-6] Add state to logits processing #3
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
base: main
Are you sure you want to change the base?
Conversation
|
@xhr15 that should be everything we need for stateful logit processors in general. |
| initial_suppressed_index = Nx.tensor([opts[:initial_suppressed_index]]) | ||
|
|
||
| suppressed_index = | ||
| context.logits_processor_states[:next_suppressed_index] || initial_suppressed_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| context.logits_processor_states[:next_suppressed_index] || initial_suppressed_index | |
| context.logits_processor_state[:next_suppressed_index] || initial_suppressed_index |
| length: Enum.count(sequence, &(&1 != 0)), | ||
| input_length: 1 | ||
| input_length: 1, | ||
| logits_processor_states: %{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| logits_processor_states: %{} | |
| logits_processor_state: %{} |
The individual processor function see only a state, not all states of the batch
No description provided.