Skip to content

Parallel requests will be processed in queue if set max_tokens(request param) == max_num_tokens(trtllm build param)? #2865

Closed

Description

@zhaocc1106

I found if i set max_tokens(request param) to max_num_tokens(trtllm build param), parallel requests will be processed in queue. Is it normal?

Activity

  1. changed the title [-]Parallel request will be processed in queue if set max_tokens(request param) == max_num_tokens(trtllm build param)?[/-] [+]Parallel requests will be processed in queue if set max_tokens(request param) == max_num_tokens(trtllm build param)?[/+] on Mar 8, 2025
  2. zhangts20 commented on Mar 9, 2025

    @zhangts20

    For a single request, the max generated tokens will be truncated to ensure input_tokens + max_tokens <= sequence_length <= max_tokens, and you can check if there are any warning logs.

  3. zhaocc1106 commented on Mar 9, 2025

    @zhaocc1106
    Author

    For a single request, the max generated tokens will be truncated to ensure input_tokens + max_tokens <= sequence_length <= max_tokens, and you can check if there are any warning logs.

    Thanks for answering. But my true question is that when one request set very big max_tokens, other requests will be blocked when the request end. Is it normal?

  4. zhangts20 commented on Mar 9, 2025

    @zhangts20

    According to the docs, the conditions for blocking a request mainly include reaching the max_batch_size or the max_num_tokens, I think your case is the latter.

  5. zhaocc1106 commented on Mar 9, 2025

    @zhaocc1106
    Author

    Alright. Will the request with big max_tokens param occupy all tokens in advance even though the answering len do not reach the max len?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions