Skip to content

Commit ad46c6d

Browse files
committed
bug-fix
1 parent 0e0f3d7 commit ad46c6d

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

onecomp/lpcd/_lpcd_runner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def run_quantize_with_lpcd(
7171
tokenizer=tokenizer,
7272
device=torch.device('cpu'),
7373
calibration_config=calibration_config,
74+
model=model,
7475
logger=logger,
7576
)
7677

tests/vllm_plugins/gptq/test_mixed_gptq_e2e.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,24 @@ class TestMixedGroupSizeVllmInference:
133133
"""Load the quantized model with vLLM and verify generation works."""
134134

135135
def test_generate_produces_non_empty_output(self, quantized_model_dir):
136+
# gpu_memory_utilization is lowered from the vLLM default (0.92) to
137+
# accommodate DGX Spark's 128 GB Unified Memory and the test job's
138+
# SLURM cgroup limit (--mem=115G in run_test_vllm.sh):
139+
# - 0.92 (~112 GiB) trips vLLM's own startup OOM check (only ~106
140+
# GiB of UMA is free after AutoBit quantization runs in the same
141+
# process).
142+
# - 0.85 (~103 GiB) clears vLLM's check but the resulting Python
143+
# residual (~16 GiB for vllm/transformers/torch imports + pytest
144+
# state) plus 103 GiB allocation overflows the 115 GiB cgroup
145+
# and the kernel OOM-kills the process.
146+
# - 0.78 (~95 GiB) leaves ~4 GiB cgroup headroom and is the
147+
# largest value we can use without cgroup OOM.
136148
llm = LLM(
137149
model=quantized_model_dir,
138150
max_model_len=512,
139151
dtype="float16",
140152
enforce_eager=True,
153+
gpu_memory_utilization=0.78,
141154
)
142155

143156
outputs = llm.generate(

vllm_plugins/gptq/vllm_plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ def _make_marlin_config(self, bits: int, group_size: int | None = None) -> GPTQM
179179
},
180180
)
181181

182-
def maybe_update_config(self, model_name, revision=None):
182+
def maybe_update_config(self, model_name, hf_config=None, revision=None):
183183
# Override to prevent base class from scanning safetensors metadata.
184184
# MixedGPTQConfig uses quantization_bits for per-layer dispatch,
185185
# so modules_in_block_to_quantize is not needed.
186+
# Signature updated for vLLM>=0.20 (added hf_config kwarg).
186187
pass
187188

188189
def get_quant_method(self, layer: torch.nn.Module, prefix: str) -> QuantizeMethodBase | None:

0 commit comments

Comments
 (0)