Skip to content
Merged
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ engine = [
cpu = [
"accelerate>=1.1.0",
"bitsandbytes>=0.46.1",
"flashinfer-python==0.6.8.post1; sys_platform=='linux'",
"flashinfer-cubin==0.6.8.post1; sys_platform=='linux'",
"flashinfer-python==0.6.13; sys_platform=='linux'",
"flashinfer-cubin==0.6.13; sys_platform=='linux'",
"gliner",
"kernels>=0.12.1,<0.15",
"kernels>=0.12.1,<0.17",
Comment thread
mckornfield marked this conversation as resolved.
Resolved
"peft>=0.18.0",
"opacus",
"sentence-transformers",
Expand All @@ -130,18 +130,18 @@ cpu = [
"transformers>=5.6,<6",
"triton>=2.0.0; sys_platform=='linux'",
"trl>=0.23.0",
"vllm==0.20.0; sys_platform=='linux'",
"vllm==0.24.0; sys_platform=='linux'",
"xgrammar>=0.2.0; sys_platform=='linux'",
]

cu129 = [
"accelerate>=1.1.0",
"bitsandbytes>=0.46.1",
"flashinfer-python==0.6.8.post1; sys_platform == 'linux'",
"flashinfer-cubin==0.6.8.post1; sys_platform == 'linux'",
"flashinfer-jit-cache==0.6.8.post1+cu129; sys_platform == 'linux'",
"flashinfer-python==0.6.13; sys_platform == 'linux'",
"flashinfer-cubin==0.6.13; sys_platform == 'linux'",
"flashinfer-jit-cache==0.6.13+cu129; sys_platform == 'linux'",
"gliner",
"kernels>=0.12.1,<0.15",
"kernels>=0.12.1,<0.17",
"nvidia-cublas-cu12; sys_platform == 'linux'",
"nvidia-ml-py; sys_platform == 'linux'",
"opacus",
Expand All @@ -155,7 +155,7 @@ cu129 = [
"transformers>=5.6,<6",
"triton>=2.0.0; sys_platform == 'linux'",
"trl>=0.23.0",
"vllm==0.20.0+cu129; sys_platform == 'linux'",
"vllm==0.24.0; sys_platform == 'linux'",
Comment thread
mckornfield marked this conversation as resolved.
Resolved
"xgrammar>=0.2.0; sys_platform == 'linux'",
]

Expand All @@ -180,8 +180,8 @@ conflicts = [


override-dependencies = [
"flashinfer-python==0.6.8.post1; sys_platform != 'darwin'",
"flashinfer-cubin==0.6.8.post1; sys_platform != 'darwin'",
"flashinfer-python==0.6.13; sys_platform != 'darwin'",
"flashinfer-cubin==0.6.13; sys_platform != 'darwin'",
]

environments = [
Expand Down Expand Up @@ -225,7 +225,7 @@ constraint-dependencies = [
# here we specifiy the dep's source from which UV should attempt to resolve
triton = { index = "pytorch-cu129", extra = "cu129" }
vllm = [
{ index = "vllm-v0-20-0-cu129", marker = "sys_platform == 'linux'", extra = "cu129" },
{ index = "vllm-v0-24-0-cu129", marker = "sys_platform == 'linux'", extra = "cu129" },
]
# for torch - we have a "cpu" dep set and "cu129" dep set, specified in the optional dependencies above
torch = [
Expand Down Expand Up @@ -319,8 +319,8 @@ url = "https://flashinfer.ai/whl/cu129"
explicit = true

[[tool.uv.index]]
name = "vllm-v0-20-0-cu129"
url = "https://wheels.vllm.ai/88d34c6409e9fb3c7b8ca0c04756f061d2099eb1/cu129"
name = "vllm-v0-24-0-cu129"
url = "https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129"
Comment thread
mckornfield marked this conversation as resolved.
Resolved
explicit = true

[[tool.uv.index]]
Expand Down
1 change: 1 addition & 0 deletions src/nemo_safe_synthesizer/generation/vllm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def initialize(self, **kwargs) -> None:
self.llm = vLLM(
model=model_ref.target(),
gpu_memory_utilization=max_vram,
max_model_len=self.model_metadata.max_seq_length,
enable_lora=True,
max_lora_rank=self.config.training.lora_r,
structured_outputs_config=structured_outputs_config,
Expand Down
1 change: 1 addition & 0 deletions tests/generation/test_vllm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ def test_initialize_passes_cached_snapshot_target_and_trust_to_vllm(

assert backend.llm is mock_llm
assert mock_vllm.call_args.kwargs["model"] == str(snapshot)
assert mock_vllm.call_args.kwargs["max_model_len"] == mock_model_metadata.max_seq_length
assert mock_vllm.call_args.kwargs["trust_remote_code"] is True

def test_initialize_caches_engine_runtime_config(
Expand Down
Loading
Loading