Skip to content

Fix: LLM API logits processor example comments #2962

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

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/llm-api/llm_logits_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# The recommended way to create a customized logits processor:
# * Subclass this class and implement the processing logics in the __call__ method.
# * Subclass LogitsProcessor and implement the processing logics in the __call__ method.
# * Create an instance and pass to SamplingParams.
# Alternatively, you can create any callable with the same signature with the __call__ method.
# This simple callback will output a specific token at each step irrespective of prompt.
Expand All @@ -32,7 +32,7 @@ def __call__(self, req_id: int, logits: torch.Tensor,


# The recommended way to create a customized batched logits processor:
# * Subclass this class and implement the processing logics in the __call__ method.
# * Subclass BatchedLogitsProcessor and implement the processing logics in the __call__ method.
# * Create an instance and pass to LLM.
# Alternatively, you can create any callable with the same signature with the __call__ method.
# A batched logits processor's arguments for all requests in a batch are made available as lists.
Expand Down