[Rust Frontend] Keep --max-model-len engine-owned (#49944)
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
e09900436c
commit
fd9d2ede6f
@@ -39,6 +39,12 @@ pub struct ManagedEngineArgs {
|
||||
/// Number of data parallel replicas to run on this node.
|
||||
#[arg(long)]
|
||||
pub data_parallel_size_local: Option<usize>,
|
||||
/// Maximum model context length forwarded to the managed Python engine.
|
||||
///
|
||||
/// Rust leaves validation to Python so values such as `auto` and
|
||||
/// human-readable integers retain their engine-owned semantics.
|
||||
#[arg(long)]
|
||||
pub max_model_len: Option<String>,
|
||||
|
||||
/// Additional arguments forwarded to `python -m vllm.entrypoints.cli.main
|
||||
/// serve ...`.
|
||||
@@ -78,7 +84,6 @@ impl ManagedEngineArgs {
|
||||
pub fn into_config(
|
||||
self,
|
||||
model: String,
|
||||
max_model_len: Option<u32>,
|
||||
max_logprobs: Option<i32>,
|
||||
profiler_config: Option<String>,
|
||||
reasoning_parser: Option<&str>,
|
||||
@@ -89,9 +94,9 @@ impl ManagedEngineArgs {
|
||||
) -> ManagedEngineConfig {
|
||||
let mut python_args = self.python_args;
|
||||
// Manually forward some args to the Python engine.
|
||||
if let Some(max_model_len) = max_model_len {
|
||||
if let Some(max_model_len) = self.max_model_len {
|
||||
python_args.push("--max-model-len".to_string());
|
||||
python_args.push(max_model_len.to_string());
|
||||
python_args.push(max_model_len);
|
||||
}
|
||||
if let Some(max_logprobs) = max_logprobs {
|
||||
python_args.push("--max-logprobs".to_string());
|
||||
|
||||
Reference in New Issue
Block a user