Skip to content

Commit cd71021

Browse files
aviv1ron1ItzikVa
authored andcommitted
Cap vLLM memory in the skinning equivalence worker
The skinning vLLM tests failed on every `skips` run at engine init: vLLM's default gpu_memory_utilization (0.92 in newer releases) is a fraction of total device memory, and earlier in-process HF tests leave ~9 GiB held by the parent pytest, so only 70.19/79.25 GiB is free against the 72.91 GiB requested. Pass gpu_memory_utilization=0.8 and max_model_len=2048 (inputs top out at 256 tokens; this stops vLLM sizing KV cache for the full 131k context). The original and the skin both run through cmd_run, so they keep identical settings. Signed-off-by: aviv ron <rona@il.ibm.com>
1 parent 5b81945 commit cd71021

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎tests/composer/_skinning_equivalence_worker_vllm.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ def cmd_run(args):
136136
dtype_s = _dtype_str(dtype)
137137
print(f" native_dtype={dtype}")
138138

139-
# Create vLLM instance
139+
# Create vLLM instance. Both the original and the skin go through this path, so
140+
# they share these memory settings and the comparison stays like-for-like.
141+
# gpu_memory_utilization: vLLM's default (0.92 in newer releases) is a fraction of
142+
# TOTAL memory and exceeds what is free once earlier in-process HF tests in the
143+
# parent pytest hold ~9 GiB. max_model_len: the longest input is 256 tokens, so
144+
# don't let vLLM size the KV cache for the model's full 131k context.
140145
print(f"Creating vLLM LLM for {model_path}...")
141146
llm_kwargs = dict(
142147
model=model_path,
@@ -145,6 +150,8 @@ def cmd_run(args):
145150
enforce_eager=True,
146151
enable_prefix_caching=False,
147152
skip_tokenizer_init=True,
153+
gpu_memory_utilization=0.8,
154+
max_model_len=2048,
148155
)
149156

150157
llm = LLM(**llm_kwargs)

0 commit comments

Comments
 (0)