lm-sys / lm-sys/FastChat

why make the n= fixed in vllm worker generate_stream method

Open
#3,717 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

could you explain the purpose make the n=1 fixed

I want to call the vllm worker directly, but I can not get multipe choice. I checked the code, find this

in generate_stream method

    sampling_params = SamplingParams(
        n=1,
        temperature=temperature,
        top_p=top_p,
        use_beam_search=use_beam_search,
        stop=list(stop),
        stop_token_ids=stop_token_ids,
        max_tokens=max_new_tokens,
        top_k=top_k,
        presence_penalty=presence_penalty,
        frequency_penalty=frequency_penalty,
        best_of=best_of,
    )

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the vllm worker's generate_stream method and the SamplingParams construction shown in the issue. Read the surrounding worker implementation and the referenced SamplingParams behavior to determine the intended role of n=1 and whether direct callers can request multiple choices. Done means documenting the rationale and supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.