vllm-project / vllm

A high-throughput and memory-efficient inference and serving engine for LLMs
https://docs.vllm.ai
Apache License 2.0
30.65k stars 4.65k forks source link

[Feature]: Support for Registering Model-Specific Default Sampling Parameters #10539

Open yansh97 opened 1 day ago

yansh97 commented 1 day ago

🚀 The feature, motivation and pitch

When starting an OpenAI-compatible server, provide a specific set of sampling parameters to override the default parameters provided by vLLM.

Some model publishers (e.g., Qwen2.5) provide a set of parameters optimized for their model. Setting these parameters manually in the client for every request can be cumbersome, and forgetting to do so may result in incoherent outputs.

Do the maintainers of vLLM consider it necessary to allow registering such parameters along with the model, so they can override the default sampling parameters?

If deemed necessary, I am open to developing this feature and submitting a pull request.

Alternatives

No response

Additional context

https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/generation_config.json

Before submitting a new issue...

yansh97 commented 1 day ago

Providing these parameters in generation_config seems to be a non-standard approach, making it impractical to parse this file for specific sampling parameters.