Skip to content

Expose DecodeSpecialTokens through IInferenceParams for StatelessExecutor #1203

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

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

Conversation

jacob-mink-1996
Copy link

Add DecodeSpecialTokens property to IInferenceParams - implement it where applicable. Use the new property in StatelessExecutor.

As far as I can tell, this meant changing

  • InferenceParams (Llama)
  • InferenceOptions (LLama.Web)

The only executor that was using the StreamingTokenDecoder class is StatelessExecutor - I suspect that means that Context.Decode is not susceptible to this issue, although I've not tried that since I don't have a non-stateless use case (yet).

Fixes #1201

…here applicable. Use the new property in StatelessExecutor
@jacob-mink-1996 jacob-mink-1996 force-pushed the enable-executor-specify-decode-special-tokens branch from b6c3097 to 596d511 Compare June 6, 2025 14:25
@jacob-vincent-mink
Copy link

jacob-vincent-mink commented Jun 6, 2025

@martindevans - thanks for the direction on this.
I've verified that it solves my problem when trying to work off of special tokens like [TOOL_CALLS].

(and apologies for the account confusion in here - had to get my GPGs all in order).

Copy link
Member

@martindevans martindevans left a comment

Choose a reason for hiding this comment

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

Looks good, thanks ❤️

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.

[BUG]: DecodeSpecialTokens is exposed by the StreamingTokenDecoder but is not accessible when using an ILlamaExecutor
3 participants