This project is a fork of Distributed Llama, adapted to run Google's Diffusion Gemma 26B A4B model in a distributed environment. DDLLM supports inference on CPUs with ARM or AVX2 optimizations, as well as on Vulkan-compatible GPUs. It can run inference across 1, 2, 4, or 8 nodes using weights in float32 or Q40 format.
| Speed | Transfer / token | Transfer / canvas | |
|---|---|---|---|
| 2 x Raspberry Pi 5 8 GB | 0.353 tokens/s | 7.6 MB | 139.2 MB |
| 4 x Raspberry Pi 5 8 GB | 0.709 tokens/s | 22.9 MB | 419.7 MB |
More details here.
Build the project on the root and worker nodes:
make -jStart the worker first. Its port must be reachable from the root:
./ddllm worker --host 0.0.0.0 --port 9990 --nthreads 8On the root, download the model and start inference using the worker's IP address:
python3 launch.py
./ddllm inference \
--model models/diffusion-gemma-q40.ddlm \
--tokenizer models/diffusion-gemma.ddlt \
--workers 192.168.1.20:9990 \
--prompt $'<bos><|turn>user\nHello!<turn|>\n<|turn>model\n' \
--steps 64 \
--nthreads 8The root sends the model weights to workers, so the model files are needed only on the root.
This project is released under the MIT license.