Repository navigation
Run Edge0 model folders with edge0-strata, as a llama-swap model - #51
Open
ihavespoons wants to merge 2 commits into
Open
ihavespoons wants to merge 2 commits into
ihavespoons wants to merge 2 commits into
Conversation
llama.cpp cannot run the Edge0 latent MoE models. Their engine is edge0-strata, and the fork github.com/diffsec/Edge0 carries its kernels for the Radeon RX 7900 matrix cores. The HIP llama-swap image builds the engine in a stage of its own and adds its Python server. The scanner lists a folder with an Edge0 model.json and an expert file as one model. The generator gives it a launcher command, so llama-swap starts, swaps and stops it like any other model: - A model that spans the selected GPUs runs as a layer split, alone. - A model pinned to one GPU leaves the other GPUs to other models. The launcher removes GPU_MAX_HW_QUEUES for the engine. With the image's value of 1, the first request stops with "verify: timed out at layer 1". It also removes --pcie-mode dma on a layer split, which stops the first request in the same way. The download picker offers an Edge0 repository as one variant, the whole folder. Files keep their subfolders. Hugging Face gives a SHA-256 for LFS files only, so a small file is checked against its Git blob ID. The engine keeps the expert file in system RAM. The load route and the launcher refuse a load when MemAvailable is lower than the file plus 6 GiB. The TUI and the console show only the layout, the context size and the hidden flag for an Edge0 model. The benchmark and the optimizer refuse it, because both measure llama.cpp. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The engine keeps the whole expert file in RAM by default, even when two cards hold most of it. On more than one GPU the launcher now adds --resident-experts, so RAM keeps only the experts that no GPU holds. On two 24 GB cards that was 21.4 GiB of a 37.3 GiB file. The load check follows: a model that spans GPUs counts 65% of the expert file plus 6 GiB (Model.Edge0RAMOn), which is 30.3 GiB for Edge0 145B where one GPU needs 43.3 GiB. EDGE0_REF moves to 49d5def. Before that commit, the second card of a split was given pointers to the first card's latent weights and token embedding table, and the first request never finished. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Sibyl can now download, load and serve an Edge0 model folder, such as
Edge0/Edge0-145B-q3k. llama.cpp cannot run these models. Their engine is edge0-strata, and the forkgithub.com/diffsec/Edge0carries its kernels for the Radeon RX 7900 matrix cores (diffsec/Edge0#1).The engine runs as one more llama-swap model inside the existing HIP image. There is no second container and no new unit, so the swap rules, the router, the load routes and the watchdog do not change.
containers/llama-swap/Containerfile.hipbuilds the engine in a stage of its own, forgfx1100only, at the commit inEDGE0_REF. Its base image is pinned by digest.models.Scanlists a folder with an Edge0model.jsonand anexperts.binas one model, withengine: edge0. The folder's GGUF files are parts of it.llamaswap.Generategives the model the command ofedge0-launch.py. A model that spans the selected GPUs runs as a layer split, in a matrix set of its own. A model pinned to one GPU shares thepinnedset, so a GGUF model on another GPU runs beside it.POST /models/{id}/loadand the launcher refuse a load whenMemAvailableis lower than the model's RAM need. On one GPU that is the expert file plus 6 GiB, which is 43.3 GiB for Edge0 145B. A span counts 65% of the expert file plus 6 GiB, which is 30.3 GiB.--resident-experts, the engine's low-RAM mode: RAM keeps only the experts that no GPU holds.422.The launcher changes two things that stop the engine:
GPU_MAX_HW_QUEUESfrom the engine's environment. With the image's value of 1, the first request stops withverify: timed out at layer 1.--pcie-mode dmaon more than one GPU. That option is not tested on a layer split.EDGE0_REFis49d5def. Before that commit, the second card of a split was given pointers to the first card's latent weights and token embedding table. A card cannot read another card's VRAM, so the first request never finished.How it was checked
go vet ./...,go test -race ./...andgolangci-lint run ./...pass, with new tests for the scanner, the generator, the download, the Hugging Face client, the load route and the model routes.actionlint .github/workflows/bootc.ymlpasses. hadolint is not installed here, so it did not run.d7de835c: 75 files, 98.13 GiB, 43.32 GiB of RAM.podman build, andcheck-libs.shpassed./runningshowed both asready./upstream/<model>/healthand/upstream/<model>/metrics, which the watchdog reads, answered200.Not checked
llamacpp:*counters. The health check does cover it.🤖 Generated with Claude Code