Text Generation
Transformers
Safetensors
PyTorch
nemotron_h
nvidia
conversational
custom_code
Eval Results
suhara commited on
Commit
52469ad
·
verified ·
1 Parent(s): eb82b63

Add vLLM example w/ 1M context length (#38)

Browse files

- Add vLLM example w/ 1M context length (a7827f58c69fb9db6b791916cae7cc86bef763bf)

Files changed (1) hide show
  1. README.md +21 -2
README.md CHANGED
@@ -315,11 +315,12 @@ Download the custom parser from the Hugging Face repository.
315
  wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16/resolve/main/nano_v3_reasoning_parser.py
316
  ```
317
 
318
- Launch a vLLM server using the custom parser. In this example, we use a context length of 256k. You can increase the context size up to 1M to support longer contexts.
319
 
320
  ```
321
  vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \
322
- --max-num-seqs 8 \
 
323
  --tensor-parallel-size 1 \
324
  --max-model-len 262144 \
325
  --port 8000 \
@@ -330,6 +331,24 @@ vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \
330
  --reasoning-parser nano_v3
331
  ```
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  Here is an example client code for vLLM. By default, the endpoint has reasoning enabled. We recommend setting a high value (e.g., 10,000) for `max_tokens`.
334
 
335
  ```shell
 
315
  wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16/resolve/main/nano_v3_reasoning_parser.py
316
  ```
317
 
318
+ Launch a vLLM server using the custom parser.
319
 
320
  ```
321
  vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \
322
+ --served-model-name model \
323
+ --max-num-seqs 8 \
324
  --tensor-parallel-size 1 \
325
  --max-model-len 262144 \
326
  --port 8000 \
 
331
  --reasoning-parser nano_v3
332
  ```
333
 
334
+ In the example above, we use a context length of 256k. You can increase the context size up to 1M to support longer contexts.
335
+ To enable this, set the `VLLM_ALLOW_LONG_MAX_MODEL_LEN=1` environment variable as shown below:
336
+
337
+ ```
338
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \
339
+ vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \
340
+ --served-model-name model \
341
+ --max-num-seqs 8 \
342
+ --tensor-parallel-size 1 \
343
+ --max-model-len 1M \
344
+ --port 8000 \
345
+ --trust-remote-code \
346
+ --enable-auto-tool-choice \
347
+ --tool-call-parser qwen3_coder \
348
+ --reasoning-parser-plugin nano_v3_reasoning_parser.py \
349
+ --reasoning-parser nano_v3
350
+ ```
351
+
352
  Here is an example client code for vLLM. By default, the endpoint has reasoning enabled. We recommend setting a high value (e.g., 10,000) for `max_tokens`.
353
 
354
  ```shell