Skip to content

[Doc] Fix 'tokenized' -> 'tokenizer' typo in streamer docstrings#45508

Merged
stevhliu merged 1 commit intohuggingface:mainfrom
avasis-ai:fix/streamers-docstring-typo
Apr 20, 2026
Merged

[Doc] Fix 'tokenized' -> 'tokenizer' typo in streamer docstrings#45508
stevhliu merged 1 commit intohuggingface:mainfrom
avasis-ai:fix/streamers-docstring-typo

Conversation

@avasis-ai
Copy link
Copy Markdown
Contributor

Summary

Fixes a systematic docstring typo in all three streamer classes in src/transformers/generation/streamers.py:

  • TextStreamer
  • TextIteratorStreamer
  • AsyncTextIteratorStreamer

Each had "The tokenized used to decode the tokens." in the tokenizer parameter description. This should be "The tokenizer used to decode the tokens." — the parameter accepts a tokenizer object, not a tokenized output.

Why this is not a duplicate

No existing PR addresses this specific documentation error across all three streamer classes.

AI assistance disclosure

This PR was prepared with AI assistance. The submitting human has reviewed every changed line and confirms the fix is correct.

Co-authored-by: opencode

All three streamer classes (TextStreamer, TextIteratorStreamer,
AsyncTextIteratorStreamer) had 'The tokenized used to decode the tokens'
in their docstrings, which should be 'The tokenizer used to decode
the tokens'.
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@stevhliu stevhliu added this pull request to the merge queue Apr 20, 2026
Merged via the queue into huggingface:main with commit 631d450 Apr 20, 2026
17 checks passed
lvliang-intel pushed a commit to lvliang-intel/transformers that referenced this pull request Apr 21, 2026
…gingface#45508)

All three streamer classes (TextStreamer, TextIteratorStreamer,
AsyncTextIteratorStreamer) had 'The tokenized used to decode the tokens'
in their docstrings, which should be 'The tokenizer used to decode
the tokens'.

Co-authored-by: Abhay <abhayjnayakpro@gmail.com>
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.

4 participants