Retrieved article excerpt
Open article · Retrieved 2026-11-24T09:24:58.777663+00:00
# Seabraid
**GPUs from different vendors serve one model at the same layer using their native
kernels.** With Seabraid, an NVIDIA card running CUDA and an AMD card running ROCm
each store and compute a share of the experts in the *same* Mixture-of-Experts
layer. The engine keeps its scheduler, KV cache and loader, and sends the routed
rows to Seabraid. Seabraid manages sessions, tickets and expert placement, and
calls the engine's providers (one per device) for the expert computations.
*The name refers to braiding any number of strands (vendors, kernels, devices) into one rope, representing one model.*
> **Alpha: use at your own risk.** Version 0.5.0-alpha.8. The project may change at any time without notice.
> Linux x86-64 is the supported release platform. Windows source builds of the core runtime are experimental.
> The ABI can change before 1.0.
> Several paths are untested. All speed measurements come from one machine, and the older add-on figures each come from a single run.
> Created by Saltwater Research LLC. Review [what is verified](https://github.com/saltwater-research/seabraid#whats-verified) before building on this release.
## Why it's new
In **expert braiding** (cross-vendor expert parallelism), GPUs from different
vendors share the experts in each MoE layer and work on that layer concurrently.
See [How it works](https://github.com/saltwater-research/seabraid/blob/main/docs/HOW-IT-WORKS.md) for an overview.
Seabraid runs each card's vendor-native kernels in its **own process** to isolate
toolkits, allow worker replacement and contain failures. This design choice makes
no claim about runtime capabilities. Separate processes keep each vendor toolkit
out of the engine's address space. The engine can replace or retire a stalled or
dead worker without shutting down. The Rust core manages sessions, tickets and
placement, and calls a provider callback for each device. In the Strata adapter,
the provider communicates with a per-vendor helper process over shared memory
once per layer. The adapter sends the routed rows, each card computes the experts
it holds, and the helpers return partial sums. The exchange uses no network or
peer-to-peer connection.
```
flowchart LR
E["Engine<br/>router, scheduler, KV, merge"] --> A["Adapter"]
A --> C["Seabraid C ABI"]
C --> R["Rust core<br/>sessions, tickets, placement"]
R -->|"provider callbacks"| A2["Adapter provider<br/>(adapters/strata)"]
A2 -->|"routed rows<br/>shared memory"| P1["CUDA helper process<br/>NVIDIA card"]
A2 -->|"routed rows<br/>shared memory"| P2["ROCm helper process<br/>AMD card"]
P1 -->|"partial sums"| A2
P2 -->|"partial sums"| A2
```
Loading
Seabraid combines **routed experts split within one layer across vendors**,
**vendor-native workers**, an **engine-neutral C ABI**, and **acknowledged
ownership changes at a drained boundary**. Our prior-art searches (2026-11-15,
updated 2026-11-19) found no work that combines all four. A search cannot
establish priority, and we make no "first" or "only" claim.
- **llama.cpp** supports mixed vendors in one process through its Vulkan backend.
It splits the model by layer and uses Vulkan kernels instead of native CUDA
or ROCm kernels. Its RPC backend offloads parts of a model to remote workers
over a network by layer or graph. HeteroLLM, a single-author benchmark, uses
llama.cpp to split a dense 70B model by layer across an RTX 5090 and an AMD R9700.
- **Strata's `--peer-device` mode** (v0.2.15, `docs/SECOND_GPU.md`) places a
second adaptive expert cache on another CUDA device. That device computes the
rows for its own experts during decode windows and prompt chunks. Activations
cross NVLink or another peer-to-peer path. The same-layer expert split runs in
one process and supports CUDA only. Seabraid supports a same-layer split across
vendors (CUDA and ROCm) in separate processes behind an engine-neutral C ABI.
Strata's helper caches (`--expert-cache-device1` to `3`) and layer split
are single-vendor.
- **Strata and Project Maya** tier experts across the VRAM, RAM and NVMe of one
vendor's cards.
- **KTransformers and SGLang** split experts between the CPU and the GPU.
- Related systems include Tutel, FlexMoE, DeepSeek EPLB, CoX-MoE, AdaOffload,
ThunderEP, TritonMoE, HAP, HeterMoE and MLC-LLM. We found no work that combines a
same-layer expert split across vendors, vendor-native workers, an engine-neutral C ABI and acknowledged ownership
changes at a drained boundary, and a search cannot establish priority. See the [technical note](https://github.com/saltwater-research/seabraid/blob/main/docs/TECHNICAL-NOTE.md#8-related-work)
for details and citations.
The search may have missed relevant work. Please share any additional prior art you know of.
## Why engines benefit
The design goal is to let an engine keep its router and send each additional
device the rows and picks assigned to it. Each engine needs an adapter that implements the
provider callback. Strata also needs patches applied to a pinned source tree.
The [Strata integration](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/README.md) under `compat/strata` includes patches,
a helper process and an installer that connect Strata to a device from another vendor. The integration also uses
`adapters/strata/strata-v7-seabraid.patch`.
The Strata integration has run live on one machine. The llama.cpp integration through the ggml adapter
has been verified on fixtures, and its hook does not call the runtime. The
remaining integrations below are planned and have not been implemented. The new
runtime has no demonstrated speed-up over stock.
| Engine | What it has today | What Seabraid adds | How to hook in | Status |
| --- | --- | --- | --- | --- |
| **Strata** | Expert tiers across VRAM, RAM and NVMe for one vendor | A second card from another vendor as an expert tier, with live re-tiering across cards | [`adapters/strata`](https://github.com/saltwater-research/seabraid/blob/main/adapters/strata/README.md) plus the [Strata integration](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/README.md) | The add-on was **measured**. The new runtime ran on one machine. See [results](https://github.com/saltwater-research/seabraid#measured-results) and [what is verified](https://github.com/saltwater-research/seabraid#whats-verified) |
| **Project Maya** | Strata-family tiering | Same as Strata | Same adapter path | Not tested |
| **llama.cpp / ik\_llama.cpp** | Layer split, Vulkan support for mixed vendors and MoE expert cache | Per-layer expert split across native CUDA and ROCm providers | [`adapters/ggml`](https://github.com/saltwater-research/seabraid/blob/main/adapters/ggml/MAP.md) and an opt-in scheduler hook patch | **Verified on fixtures** (Q4\_0 on CPU, CUDA, HIP and Vulkan against ggml 1.0.0, 2026-11-17). The opt-in hook gives bit-identical results to stock llama.cpp on a loaded model across four backends. It appends ggml operations and does not call the Seabraid runtime, so no expert split inside llama.cpp has been run |
| **KTransformers, SGLang, vLLM** | CPU and GPU hybrid experts, or expert parallelism within one vendor build | A provider for a second device alongside the existing path, with mixed-vendor devices in one expert layer | Python binding or C ABI provider | Planned, not integrated |
| **Anything that routes work to a second device** | Its own routing | Sessions, partial sums and placement | A provider callback (21 lines in [`examples/minimal_provider.c`](https://github.com/saltwater-research/seabraid/blob/main/examples/minimal_provider.c), 100 lines with its driver), [adapter guide](https://github.com/saltwater-research/seabraid/blob/main/docs/ADAPTER-GUIDE.md) | The fixtures verify the mechanism |
## Lineage
[Strata](https://github.com/Niko1221/Strata) inspired Seabraid, particularly the
work of Niko ([Niko1221](https://github.com/Niko1221)) and the other Strata
contributors.
Expert braiding began as a Strata add-on, now in
[`compat/strata`](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/README.md). This release includes a **Strata
plug-in** with the [Strata adapter](https://github.com/saltwater-research/seabraid/blob/main/adapters/strata/README.md), its patch and the
original add-on. Thank you to Niko and all Strata contributors. We also thank the
llama.cpp/ggml, KTransformers and SGLang developers for designs that informed
Seabraid, and the Qwen team, DeepSeek and ISTA-DASLab for the openly released
models and quantizations we used in our measurements.
Seabraid draws on Strata's architecture, particularly its adaptive tiered expert
cache (VRAM, RAM, NVMe). We wrote the Rust ownership map in
[`src/placement.rs`](https://github.com/saltwater-research/seabraid/blob/main/src/placement.rs) by porting the map that
[patch 0012](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/patches/strata) adds to Strata. We generalized the map
using ideas from the llama.cpp ggml scheduler and its RPC backend's versioned
handshake, which [the helper protocol notes](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/docs/PROTOCOL.md)
cite as prior work. The CPU/GPU hybrid engines KTransformers and SGLang also
informed the design.
## Our tweaks, carried on our side
We maintain the Strata patches in [`compat/strata/patches/strata`](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/patches/strata).
To apply the patches to the pinned Strata commit (v0.2.15, `c77572806`, recorded
in [`STRATA_BASE`](https://github.com/saltwater-research/seabraid/blob/main/compat/strata/patches/strata/STRATA_BASE)), use `git am`. Opt-in patches are
off by default. Numbers 0007, 0008 and 0009 are intentionally absent. The 0007
channel v6 specification region moved to the adapter-owned
[`adapters/strata/wire`](https://github.com/saltwater-research/seabraid/blob/main/adapters/strata/wire) and no longer patches Strata. We
removed 0008 and 0009, the DeepSeek-V4.1 helper link and link check, because
Strata 0.2.14 removed that engine.
| Patch | What |
| --- | --- |
| 0002 | ExpertCache fill clamp fix |
| 0003 | DFlash2 window (**opt-in**, speculative-decode tuning) |
| 0004, 0005 | Re-tier call site and residency publishing |
| 0006 | Hot-share (**opt-in, experimental, no measured win**) |
| 0010 | Remote expert weighted output |
| 0011 | Route histograms (**opt-in**) |
| 0012 | N-card ladder ownership map and promotion (**opt-in**) |
| 0013 | D4 remote prefill (**opt-in**) |
| 0014 | Channel geometry validation and private handoff |
| 0015 | Removal of a ptrace debug switch |
| 0016 | Bounded, control-stripped reads of helper-written text; structured private-attach result |
| 0017 | One channel per helper process; a blob swap the helper writes and reads back |
| 0018 | Names where an expert's bytes live and sends a file reference (wire v9) |
| 0019 | A lost helper closes its card instead of ending the engine (the exit watch, the layer deadline, the rows computed on the CPU) |
| 0020 | A helper that is already dead at engine start opens as a closed card whatever state its last engine left (after a graceful stop too); a live helper still in `kShutdown` is waited for |
Patch 0001 adds the external expert helper tier. The llama.cpp patch,
[`adapters/ggml/llama-cpp-qwen3moe.patch`](https://github.com/saltwater-research/seabraid/blob/main/adapters/ggml/llama-cpp-qwen3moe.patch),
is opt-in.
## Requirements
The native wheel targets Linux x86-64 with glibc 2.34 or newer (`manylinux_2_34_x86_64`).
It was tested on one Linux machine. The build requirements are listed below.
- Python 3.11 or newer (`requires-python` in `pyproject.toml`) and `setuptools>=77`
to build the package (a `pyproject.toml` build requirement). A venv created with
Python 3.12 or newer does not include setuptools. Install it with
`pip install "setuptools>=77"` in the active venv before building th