Skip to content

Commit feb3786

Browse files
rgerganovarthw
authored andcommitted
rpc : update README [no ci] (ggml-org#9320)
Update README with instructions how to offload model layers to both local and remote devices
1 parent ebcce94 commit feb3786

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

examples/rpc/README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ This can be used for distributed LLM inference with `llama.cpp` in the following
1010

1111
```mermaid
1212
flowchart TD
13-
rpcb---|TCP|srva
14-
rpcb---|TCP|srvb
15-
rpcb-.-|TCP|srvn
13+
rpcb<-->|TCP|srva
14+
rpcb<-->|TCP|srvb
15+
rpcb<-.->|TCP|srvn
1616
subgraph hostn[Host N]
17-
srvn[rpc-server]-.-backend3["Backend (CUDA,Metal,etc.)"]
17+
srvn[rpc-server]<-.->backend3["Backend (CUDA,Metal,etc.)"]
1818
end
1919
subgraph hostb[Host B]
20-
srvb[rpc-server]---backend2["Backend (CUDA,Metal,etc.)"]
20+
srvb[rpc-server]<-->backend2["Backend (CUDA,Metal,etc.)"]
2121
end
2222
subgraph hosta[Host A]
23-
srva[rpc-server]---backend["Backend (CUDA,Metal,etc.)"]
23+
srva[rpc-server]<-->backend["Backend (CUDA,Metal,etc.)"]
2424
end
2525
subgraph host[Main Host]
26-
ggml[llama.cpp]---rpcb[RPC backend]
26+
local["Backend (CUDA,Metal,etc.)"]<-->ggml[llama-cli]
27+
ggml[llama-cli]<-->rpcb[RPC backend]
2728
end
2829
style hostn stroke:#66,stroke-width:2px,stroke-dasharray: 5 5
2930
```
@@ -62,17 +63,11 @@ $ CUDA_VISIBLE_DEVICES=0 bin/rpc-server -p 50052
6263
This way you can run multiple `rpc-server` instances on the same host, each with a different CUDA device.
6364

6465

65-
On the main host build `llama.cpp` only with `-DGGML_RPC=ON`:
66-
67-
```bash
68-
mkdir build-rpc
69-
cd build-rpc
70-
cmake .. -DGGML_RPC=ON
71-
cmake --build . --config Release
72-
```
73-
74-
Finally, use the `--rpc` option to specify the host and port of each `rpc-server`:
66+
On the main host build `llama.cpp` for the local backend and add `-DGGML_RPC=ON` to the build options.
67+
Finally, when running `llama-cli`, use the `--rpc` option to specify the host and port of each `rpc-server`:
7568

7669
```bash
7770
$ bin/llama-cli -m ../models/tinyllama-1b/ggml-model-f16.gguf -p "Hello, my name is" --repeat-penalty 1.0 -n 64 --rpc 192.168.88.10:50052,192.168.88.11:50052 -ngl 99
7871
```
72+
73+
This way you can offload model layers to both local and remote devices.

0 commit comments

Comments
 (0)