diff --git a/docker-compose.yml b/docker-compose.yml index 7796b9b0..b5959a3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,7 @@ services: - --reasoning-parser=deepseek_v4 - --moe-backend=cutedsl - --gpu-memory-utilization=0.9 + - --max-model-len=876544 - --host=0.0.0.0 - --port=8000 deploy: diff --git a/vllm/cutedsl_quant_method.py b/vllm/cutedsl_quant_method.py index 85780781..2035afc9 100644 --- a/vllm/cutedsl_quant_method.py +++ b/vllm/cutedsl_quant_method.py @@ -112,12 +112,11 @@ class CuTeDSLNvfp4Method(LinearMethodBase): torch.cuda.empty_cache() # Replace weight with dummy BF16 (needed by vLLM module introspection) - # Replace weight with a minimal CPU dummy (vLLM introspection expects - # layer.weight to exist, but our kernel never uses it). Keeping it on - # GPU would waste ~5-8 GiB across all layers. + # Replace weight with a GPU dummy (some vLLM code paths like + # torch.mm(compressor.weight.T) expect weight on GPU). layer.weight = torch.nn.Parameter( torch.zeros(out_features, in_features, dtype=torch.bfloat16, - device="cpu"), + device=device), requires_grad=False, ) diff --git a/vllm/kernels/linear/nvfp4/cutedsl.py b/vllm/kernels/linear/nvfp4/cutedsl.py index fb7b7519..7a9828e0 100644 --- a/vllm/kernels/linear/nvfp4/cutedsl.py +++ b/vllm/kernels/linear/nvfp4/cutedsl.py @@ -99,13 +99,11 @@ class CuTeDSLNvFp4LinearKernel(NvFp4LinearKernel): layer._cutedsl_runner_id = register_runner(runner) layer._cutedsl_out_features = out_features - # Replace weight with a minimal CPU dummy (vLLM introspection expects - # layer.weight to exist, but our kernel never uses it). Keeping it on - # GPU would waste ~5-8 GiB across all layers (e.g. q_b_proj alone - # is 192 MiB of zeros). + # Replace weight with a GPU dummy (some vLLM code paths like + # torch.mm(compressor.weight.T) expect weight on GPU). layer.weight = torch.nn.Parameter( torch.zeros(out_features, in_features, dtype=torch.bfloat16, - device="cpu"), + device=device), requires_grad=False, )