Skip to content

Conversation

@joelpaulkoch
Copy link
Member

No description provided.

@joelpaulkoch
Copy link
Member Author

@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
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
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: %{}
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
logits_processor_states: %{}
logits_processor_state: %{}

The individual processor function see only a state, not all states of the batch

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.

3 participants