Motivation
I have a main PC at home (2 GPUs, 32GB total VRAM) and a remote PC (1 GPU, 12GB), totaling 44GB of VRAM. I wondered, "If I could link these over the network, could I run 70B-class local LLMs that wouldn't fit on a single machine?" So, I decided to build and test it.
However, my goal wasn't just to make it "run." A common benchmark for whether a local LLM is practical is 15 to 20 tokens per second or more. If it falls below this, the model generates text slower than you can read it, leading to a strong feeling of being kept waiting. I set my goal not to "make it run, but it's too slow to be practical," but to run a 72B-class model at a speed suitable for daily use.
In conclusion, I was able to run it at a practical speed. First, I will introduce the configuration and verification results, and in the second half, I will summarize the detailed steps for building it.
What is "distributed inference" anyway? — One way to run large local LLMs
To be honest, I didn't even know the term "distributed inference" until I researched it this time. For those who are similarly struggling with "I want to run a large model, but it won't fit on my GPU," I will first organize the overall landscape of options.
To run a local LLM, you need to load the entire model weights into VRAM. Roughly speaking, the required VRAM can be estimated by number of parameters × quantization bits ÷ 8. For a 70B (70 billion parameter) model, you need about 140GB at 16-bit precision, about 70GB at 8-bit quantization, and about 35-40GB even if you drop it to 4-bit quantization. Since consumer GPUs typically have 8-24GB of VRAM, it won't fit as is.
There are three main approaches to this.
The theme of this article, distributed inference, is further divided into two methods.
Tensor Parallelism: The calculation of a single layer is split across multiple devices and computed simultaneously. Because a large amount of data must be exchanged with low latency every time a layer is calculated, it requires data-center-grade ultra-high-bandwidth interconnects like NVLink or InfiniBand. It is not realistic to achieve this with a home LAN.
Pipeline Parallelism (Layer-wise Parallelism): The model is assigned to devices in chunks of layers and computed in a bucket-brigade fashion. Since the only data exchanged between devices is small activation vectors that cross layer boundaries, communication requirements are greatly relaxed, and it can work at practical speeds even on a standard 1GbE LAN or home hub.
The llama.cpp RPC backend used this time is this pipeline parallelism (layer-wise) method. That is why, even in a home hub-based LAN environment, the network does not become a bottleneck, as shown in the benchmarks below. Conversely, it is important to understand that this is not a technology for "true parallel computing across multiple GPUs for explosive speed," but rather a technology for "collecting VRAM from multiple devices to make a model that wouldn't fit on a single device runnable." This will help prevent mismatched expectations.
Overall Configuration
I used the llama.cpp RPC backend. By starting the rpc-server on the remote PC and connecting from the llama-server on the main PC, the model's layers are automatically split and distributed across multiple GPUs over the network.
The key point is that what is exchanged over the network is not the model weights themselves, but only the activation vectors that cross layer boundaries. Since no communication occurs within the segments handled by the remote PC, the communication volume is not as high as it might seem (this was also confirmed in the following benchmarks).
Benchmark: RPC Distributed vs. Local CPU Offloading
I verified, "Is adding a remote GPU over the network really faster than just offloading to the CPU on the main PC?" The comparison was done using LM Studio, measuring generation speed with the same model and the same prompt.
RPC Distributed Inference (Main PC 32GB + Remote 12GB, all layers on GPU): 4.9–5.5 tokens/sec
LM Studio Partial Offloading (GPU 55 layers + CPU 25 layers, main PC only): 3.16 tokens/sec
LM Studio Full GPU Offload (Main PC only): Load failed (VRAM exceeded, no automatic fallback to shared memory)
The results showed that even with the overhead of inter-GPU communication, using a remote GPU for computation is clearly more advantageous than CPU computation (via system RAM).
However, at this point, it still has not reached the 15–20 tokens/sec benchmark for practical speed. It was in a state where "it runs, but it's a bit underwhelming for daily use." I will introduce how to overcome this barrier immediately after this.
The misconception that "it's using shared memory"
During verification, there were moments when the system memory usage of this PC rose to 51–61GB, and I was worried that it was spilling over into the GPU's shared memory. However, looking closely at the Task Manager:
The majority of the memory usage breakdown is "Cached" (file cache via mmap of the model file).
When the model is unloaded, it is cleanly released down to 14GB.
The "Shared GPU memory" in the GPU tab itself remained at almost 0 throughout.
As a result, it appears to be just normal file caching.
Reaching practical speed: Switching the model to MoE
All verifications up to this point were with a Dense model (Qwen2.5-72B-Instruct, a standard architecture where all parameters are activated every token). Even though RPC distributed inference itself was working, it did not reach the 15–20 tokens/sec benchmark for practical speed. This is where the real topic begins.
The MoE (Mixture of Experts) model, which is becoming mainstream recently, has the characteristic that even if the total number of parameters is large, only a portion of the "experts" are actually used for computation. In pipeline parallelism (layer splitting), the speed of each stage is almost proportional to the computational load of the assigned GPU. This means that even for models that fit within the same VRAM budget, if you use MoE, the active parameters are smaller, so the computation time for each stage becomes shorter, and the load on the section handled by the particularly weak remote GPU should be significantly lighter. To verify this hypothesis, I replaced the model with an MoE one.
I used Qwen3-Coder-Next-REAP-60B-A3B (Q4_K_XL, approx. 40.9GB). This is a model where the coding-specialized MoE model Qwen3-Coder-Next (80B/active 3B) was compressed to 60B/active 3B by reducing the number of experts using a technique called REAP (Router-weighted Expert Activation Pruning). You can try it just by downloading it and replacing it while keeping the exact same RPC configuration as before (omitting -ngl/--tensor-split and leaving it to automatic fitting).
hf download lovedheart/Qwen3-Coder-Next-REAP-60B-A3B-GGUF --include "Qwen3-Coder-Next-REAP-60B-A3B-Q4_K_XL.gguf" --local-dir D:\ClaudeWork\llama_RPC\models
Here are the results.
Just by changing the model to MoE while keeping the same RPC configuration, the result was about 4 times faster (4.9–5.5 → 21.6–25.1 tokens/sec), and it clearly surpassed the 15–20 tokens/sec benchmark for practical speed. The VRAM usage was 13.8GB for this PC's GPU0, 15.1GB for GPU1, and 10.5GB for the remote GPU, totaling 39.4GB, which almost matches the model size (40.9GB) and fits neatly within the 44GB budget with automatic fitting.
In other words, I have reached the point where "I can bundle GPUs from multiple PCs over a network and run 60–70B-class models that cannot be run on a single unit at a speed that doesn't feel like I'm being kept waiting." The point is that there is such a difference just by choosing the model architecture (Dense/MoE) while keeping the same hardware and network configuration. If you are building a distributed inference environment at home, I think it is worth actively considering the MoE architecture at the model selection stage.
Summary
I was able to demonstrate that you can expand VRAM capacity by bundling GPUs from multiple PCs using llama.cpp's RPC backend.
Rather than manual load balancing between GPUs (--tensor-split), leaving it to the automatic fitting function is more stable and accurate.
Contrary to expectations, the network (in this case, via a hub LAN) was almost never a bottleneck.
Adding a remote GPU is clearly more advantageous in terms of speed than CPU offloading.
With a Dense model (Qwen2.5-72B-Instruct, IQ4_XS), it runs at 4.9–5.5 tokens/sec, which falls short of the target for practical speed (15–20 t/s).
When switching the model to an MoE (Qwen3-Coder-Next-REAP-60B-A3B), it reaches about 4x the speed at 21.6–25.1 tokens/sec, achieving practical speed. In distributed inference using layer splitting, the choice of model architecture directly impacts speed.
Being able to run a model size that wouldn't fit on a single machine by gathering GPUs from multiple PCs I already have, and doing so at a speed suitable for daily use, was a highly satisfying achievement.
For those who want to build this themselves
From here on, I will provide the specific steps to reproduce this configuration. I will summarize everything in detail, including the environment check script.
Assumed EnvironmentThe following steps assume this configuration. If your number of GPUs or VRAM capacity differs, please adjust the quantization size and the values related to --tensor-split accordingly.
Step 1: Prerequisite CheckRun the following script on both PCs to confirm that the necessary tools are installed. The check items include NVIDIA GPU/drivers, CUDA Toolkit, Visual Studio C++ Build Tools, CMake, Git, free disk space, and Windows Firewall status.
The full script is available here. Download it, save it as check-prerequisites.ps1, and run it on both PCs (it is important to save it with UTF-8 BOM. Without the BOM, PowerShell 5.1 in a Japanese Windows environment may misread it as Shift-JIS, causing syntax errors due to the Japanese characters in the comments).
How to run (same for both PCs):
powershell -ExecutionPolicy Bypass -File .\check-prerequisites.ps1
Example of execution results:
PS > powershell -ExecutionPolicy Bypass -File .\check-prerequisites.ps1
=== llama.cpp RPC 前提条件チェック ===
実行日時: 08/16/2026 18:48:03
Item Status Detail
---- ------ ------
NVIDIA GPU / ドライバ OK NVIDIA GeForce RTX 5070 Ti, 16303 MiB, 610.62 | NVIDIA GeForce RTX 5070 Ti, 16
303 MiB, 610.62
CUDA Toolkit (nvcc) OK Cuda compilation tools, release 13.3, V13.3.73
Visual Studio C++ Build Tools OK Visual Studio Build Tools 2022
CMake OK cmake version 4.4.2
Git OK git version 2.54.0.windows.1
空きディスク容量 (D:) OK 820.6 GB 空き(70B級GGUFモデル格納には50GB以上推奨)
Windows Firewall プロファイル状態 OK Domain=True, Private=True, Public=True
全項目OKです。llama.cppのビルドに進めます。Items that return NG can be installed individually using the following commands (assuming winget is available).
# CMake winget install --id Kitware.CMake -e Git winget install --id Git.Git -e Visual Studio Build Tools(C++ワークロード込み) winget install --id Microsoft.VisualStudio.2022.BuildTools -e --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" CUDA Toolkit winget install --id Nvidia.CUDA -e
Common pitfalls
You might install Visual Studio Build Tools but forget to add the C++ workload. In that case, add it using the following (must be run from an administrator PowerShell. --passive/--quiet will fail without elevation with the error: "Commands with --quiet or --passive should be run elevated from the beginning.").
& "$env:ProgramFiles(x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "$env:ProgramFiles(x86)\Microsoft Visual Studio\2022\BuildTools" --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive
(--wait option does not exist, so do not include it)
If the check script incorrectly flags "Visual Studio C++ Build Tools" as NG, check if you are using -products * with vswhere (it is included in the script above). By default, vswhere -latest only looks for Community/Professional/Enterprise and misses standalone Build Tools installations.
Once all items are OK on both PCs, proceed to the next step.
Step 2: Build llama.cpp (same for both PCs)Since the RPC protocol is not guaranteed to be compatible between versions of llama.cpp, you must build using the exact same git tag on both PCs. First, check the latest tag.
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp git tag --sort=-creatordate | Select-Object -First 5
Please specify the latest tag displayed (e.g., b10441) on both PCs as follows. Since the script above displays 5 items, use the latest one.
git checkout b10441 cmake -B build -DGGML_CUDA=ON -DGGML_RPC=ON -DCMAKE_BUILD_TYPE=Release
Main PC (the side that loads the model and manages the process):
cmake --build build --config Release -j --target llama-server
Remote PC (the side that only handles GPU calculations):
cmake --build build --config Release -j --target ggml-rpc-server
The initial build will take about 10 to 30 minutes because it includes compiling the CUDA kernels.
Common pitfalls
In previous versions, the target was named rpc-server, but as of b10441, it has been changed to ggml-rpc-server. If you get a "Project file does not exist" error, please check the actual target name using the following command.
Get-ChildItem build -Filter *rpc.vcxproj -Recurse
(Since cmake --build --target help cannot be used in a Visual Studio generation environment, it is most reliable to search for the .vcxproj file directly.)
Step 3: Start rpc-server on the remote PCcd F:\ClaudeWork\llama_RPC\llama.cpp .\build\bin\Release\ggml-rpc-server.exe -H 0.0.0.0 -p 50052
The default host is 127.0.0.1 (only accessible from the local machine), so please do not forget to specify -H 0.0.0.0. Once started, the following display will appear, indicating it is in a waiting state.
Starting RPC server v5.0.0 endpoint : 0.0.0.0:50052 Devices: CUDA0: NVIDIA GeForce RTX 3060 (12287 MiB, 11255 MiB free) transport : TCP
The RPC server is an experimental feature without authentication or encryption. Please ensure access is allowed only within your local LAN, and specifically only from the IP address of your main PC (never expose it to the internet).
New-NetFirewallRule -DisplayName "llama-rpc" -Direction Inbound -Protocol TCP -LocalPort 50052 -RemoteAddress <本PCのIPアドレス> -Action Allow
If you do not know the IP address of your main PC, you can check it by running the following on the main PC.
(Get-NetIPAddress -AddressFamily IPv4 | Where-Object $_.InterfaceAlias -notlike "Loopback" -and $_.IPAddress -notlike "169.254" ).IPAddress
After configuring, it is a good idea to verify connectivity from the main PC for peace of mind.
Test-NetConnection -ComputerName <リモートPCのIPアドレス> -Port 50052
If TcpTestSucceeded : True is displayed, you are good to go.
Step 5: Model download (Main PC only)The remote PC does not need the model file. The RPC server only handles layer calculations and does not know the contents of the model itself.
Prepare a Python environment on the main PC and download the model in GGUF format (in this case, we use the IQ4_XS quantization of bartowski/Qwen2.5-72B-Instruct-GGUF, which is approximately 39.7GB).
uv venv .venv .venv\Scripts\activate uv pip install "huggingface_hub[cli]" hf download bartowski/Qwen2.5-72B-Instruct-GGUF --include "IQ4_XS*" --local-dir D:\ClaudeWork\llama_RPC\models
If you are aiming for practical speeds with an MoE model, you can also try the following (Qwen3-Coder-Next-REAP-60B-A3B introduced in the first half of the article).
hf download lovedheart/Qwen3-Coder-Next-REAP-60B-A3B-GGUF --include "Qwen3-Coder-Next-REAP-60B-A3B-Q4_K_XL.gguf" --local-dir D:\ClaudeWork\llama_RPC\models
How to choose the quantization size
In a 44GB VRAM environment, it is safe to use a quantization that fits within about 35-40GB to account for KV cache and communication overhead. Even for the same 72B model, different quantizations result in the following sizes (please check in advance, as the files provided vary by repository).
Step 6: Integrated Startup (Main PC)With the ggml-rpc-server running on the remote PC, execute the following on the main PC.
.\build\bin\Release\llama-server.exe -m D:\ClaudeWork\llama_RPC\models\Qwen2.5-72B-Instruct-IQ4_XS.gguf --rpc <リモートPCのIPアドレス>:50052 -c 8192 -np 1 ` --host 0.0.0.0 --port 8080
(If using an MoE model, simply replace the -m path; the other options remain the same.)
There are two key points.
Do not intentionally specify -ngl (number of GPU offload layers) or --tensor-split (distribution ratio between devices). If omitted, llama.cpp will automatically determine the optimal layer distribution and KV cache allocation by checking the actual available VRAM on each device. Manually specifying ratios often leads to VRAM overflow because it fails to account for the bias in non-repeating layers like embedding layers.
Fix the number of slots to 1 using -np 1. By default, llama-server is configured to reserve 4 slots for concurrent requests; if left unspecified, your intended -c 8192 will actually consume enough KV cache for 8192 x 4 tokens.
Success is indicated if the following appears in the startup logs.
load_model: initializing, n_slots = 1, n_ctx_slot = 8192, kv_unified = 'false' llama_server: model loaded llama_server: listening on http://0.0.0.0:8080
Since it operates as an OpenAI-compatible API, you can call it directly from PowerShell. When sending Japanese text, please explicitly convert it to a UTF-8 byte sequence before sending to avoid character encoding issues.
$body = '"messages":["role":"user","content":"Pythonでフィボナッチ数列を返す関数を書いて"]' $bytes = [System.Text.Encoding]::UTF8.GetBytes($body) Invoke-WebRequest -Uri http://localhost:8080/v1/chat/completions -Method POST -ContentType "application/json; charset=utf-8" -Body $bytes -UseBasicParsing
You can also try it out from a simple Web UI by opening http://localhost:8080 in your browser.
The tg = X.XX t/s value in the print_timing log that appears in the llama-server terminal during generation is how you check the generation speed mentioned in the first half of this article. Please try it out and see what kind of speed you get in your own environment.