You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change corrects the README.md file in the examples/multimodal folder:
- Correct "vllm worker" to "decode worker"
- Correct assertion that data is moved via NATS when embeddings are moved via RDMA.
Additionally, this change updates the textual graphs with Mermaid graphs for improved presentation on github.com.
Copy file name to clipboardExpand all lines: examples/multimodal/README.md
+75-69Lines changed: 75 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,26 +24,29 @@ The examples are based on the [llava-1.5-7b-hf](https://huggingface.co/llava-hf/
24
24
25
25
### Components
26
26
27
-
- workers: For aggregated serving, we have two workers, [encode_worker](components/encode_worker.py) for encoding and [vllm_worker](components/worker.py) for prefilling and decoding.
28
-
- processor: Tokenizes the prompt and passes it to the vllm worker.
29
-
- frontend: Http endpoint to handle incoming requests.
27
+
- workers: For aggregated serving, we have two workers, [encode_worker](components/encode_worker.py) for encoding and [decode_worker](components/decode_worker.py) for prefilling and decoding.
28
+
- processor: Tokenizes the prompt and passes it to the decode worker.
29
+
- frontend: HTTP endpoint to handle incoming requests.
30
30
31
31
### Deployment
32
32
33
-
In this deployment, we have two workers, [encode_worker](components/encode_worker.py) and [vllm_worker](components/worker.py).
34
-
The encode worker is responsible for encoding the image and passing the embeddings to the vllm worker via NATS.
35
-
The vllm worker then prefills and decodes the prompt, just like the [LLM aggregated serving](../llm/README.md) example.
33
+
In this deployment, we have two workers, [encode_worker](components/encode_worker.py) and [decode_worker](components/decode_worker.py).
34
+
The encode worker is responsible for encoding the image and passing the embeddings to the decode worker via a combination of NATS and RDMA.
35
+
The work complete event is sent via NATS, while the embeddings tensor is transferred via RDMA through the NIXL interface.
36
+
Its decode worker then prefills and decodes the prompt, just like the [LLM aggregated serving](../llm/README.md) example.
36
37
By separating the encode from the prefill and decode stages, we can have a more flexible deployment and scale the
37
38
encode worker independently from the prefill and decode workers if needed.
{"id": "c37b946e-9e58-4d54-88c8-2dbd92c47b0c", "object": "chat.completion", "created": 1747725277, "model": "llava-hf/llava-1.5-7b-hf", "choices": [{"index": 0, "message": {"role": "assistant", "content": " In the image, there is a city bus parked on a street, with a street sign nearby on the right side. The bus appears to be stopped out of service. The setting is in a foggy city, giving it a slightly moody atmosphere."}, "finish_reason": "stop"}]}
87
90
```
88
91
89
92
## Multimodal Disaggregated serving
90
93
91
94
### Components
92
95
93
-
- workers: For disaggregated serving, we have three workers, [encode_worker](components/encode_worker.py) for encoding, [vllm_worker](components/worker.py) for decoding, and [prefill_worker](components/prefill_worker.py) for prefilling.
94
-
- processor: Tokenizes the prompt and passes it to the vllm worker.
95
-
- frontend: Http endpoint to handle incoming requests.
96
+
- workers: For disaggregated serving, we have three workers, [encode_worker](components/encode_worker.py) for encoding, [decode_worker](components/decode_worker.py) for decoding, and [prefill_worker](components/prefill_worker.py) for prefilling.
97
+
- processor: Tokenizes the prompt and passes it to the decode worker.
98
+
- frontend: HTTP endpoint to handle incoming requests.
96
99
97
100
### Deployment
98
101
99
-
In this deployment, we have three workers, [encode_worker](components/encode_worker.py), [vllm_worker](components/worker.py), and [prefill_worker](components/prefill_worker.py).
102
+
In this deployment, we have three workers, [encode_worker](components/encode_worker.py), [decode_worker](components/decode_worker.py), and [prefill_worker](components/prefill_worker.py).
100
103
For the Llava model, embeddings are only required during the prefill stage. As such, the encode worker is connected directly to the prefill worker.
101
-
The encode worker handles image encoding and transmits the resulting embeddings to the prefill worker via NATS.
102
-
The prefill worker performs the prefilling step and forwards the KV cache to the vllm worker for decoding.
103
-
For more details on the roles of the prefill and vllm workers, refer to the [LLM disaggregated serving](../llm/README.md) example.
104
+
The encode worker is responsible for encoding the image and passing the embeddings to the prefill worker via a combination of NATS and RDMA.
105
+
Its work complete event is sent via NATS, while the embeddings tensor is transferred via RDMA through the NIXL interface.
106
+
The prefill worker performs the prefilling step and forwards the KV cache to the decode worker for decoding.
107
+
For more details on the roles of the prefill and decode workers, refer to the [LLM disaggregated serving](../llm/README.md) example.
{"id": "c1774d61-3299-4aa3-bea1-a0af6c055ba8", "object": "chat.completion", "created": 1747725645, "model": "llava-hf/llava-1.5-7b-hf", "choices": [{"index": 0, "message": {"role": "assistant", "content": " This image shows a passenger bus traveling down the road near power lines and trees. The bus displays a sign that says \"OUT OF SERVICE\" on its front."}, "finish_reason": "stop"}]}
0 commit comments