# How to enable the --data-parallel-size function for a single machine?

**URL:** <https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670>\
**Category:** General\
**Created:** [September 28, 2025, 1:20am UTC](https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670 "2025-09-28T01:20:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![qt2139](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/qt2139/32/389_2.png) [@qt2139](https://discuss.vllm.ai/u/qt2139)\
**Post date:** [September 28, 2025, 1:20am UTC](https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670/1 "2025-09-28T01:20:26Z")

</div>

How to enable the --data-parallel-size for a single machine when using vllm CLI?

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [September 28, 2025, 1:20am UTC](https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670/2 "2025-09-28T01:20:39Z")

</div>

To enable data parallelism on a single machine with vLLM, use the --data-parallel-size argument in your vllm serve command. For example, to run with 4 data parallel ranks (requiring 4 GPUs), use:

```bash
vllm serve $MODEL --data-parallel-size 4

```

This will launch 4 engine processes, each on a separate GPU, and expose a single API endpoint. You can also combine with tensor parallelism (e.g., --data-parallel-size=4 --tensor-parallel-size=2 for 8 GPUs). For more details and multi-node options, see [Data Parallel Deployment](https://docs.vllm.ai/en/latest/serving/data_parallel_deployment.html) and [Parallelism and Scaling](https://docs.vllm.ai/en/latest/serving/parallelism_scaling.html).

Would you like more detail or example multi-node commands?

Sources:

- [Data Parallel Deployment](https://docs.vllm.ai/en/latest/serving/data_parallel_deployment.html)
- [Parallelism and Scaling](https://docs.vllm.ai/en/latest/serving/parallelism_scaling.html)

Hint: Mention @RunLLM in the post for followups.

---

<div class="post-metadata">

**Author:** ![rajesh-s](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/rajesh-s/32/744_2.png) [@rajesh-s](https://discuss.vllm.ai/u/rajesh-s)\
**Post date:** [October 7, 2025, 2:45am UTC](https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670/4 "2025-10-07T02:45:47Z")

</div>

@qt2139 If you are talking about a single host, you need to use `–-data-parallel-size-local`

---

<div class="post-metadata">

**Author:** ![hackyroot](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/hackyroot/32/647_2.png) [@hackyroot](https://discuss.vllm.ai/u/hackyroot)\
**Post date:** [October 12, 2025, 6:26am UTC](https://discuss.vllm.ai/t/how-to-enable-the-data-parallel-size-function-for-a-single-machine/1670/5 "2025-10-12T06:26:05Z")

</div>

Why do you want to enable data parallelism for a single machine?
