Repository navigation
feat(ai): serve Laya through upstream laya-serve, on the GPU when VRAM allows - #90
Merged
Merged
Conversation
…M allows Replaces the Ollaya aspect with fleet.ai/laya: upstream laya-serve (NandhaKishorM/laya v0.4.21, its own NixOS module) on the same 127.0.0.1:11435 /v1/systemone, so the Paperclip router keeps working. - laya-serve loads laya-train fine-tunes directly (settings.ai.laya.extraModels); Ollaya only runs ONNX graphs. - A start wrapper reads free VRAM: >= 4 GiB starts on cuda, else cpu. A 2-minute timer restarts it onto the other device when that changes (below 1 GiB free on the GPU -> CPU). - fp32 on both devices, so a move never shifts the probabilities thresholds are fitted on. Weights pinned to laya's reviewed revision. - 10 minutes idle unloads the checkpoint. Smoke test (scratch instance, port 11439): started on cuda, HTTP 200, warm 19-44 ms (Ollaya on the CPU: ~93 ms), 2.0 GiB VRAM, 3.0 GB RSS.
…cuda
On CUDA, ModernBERT's Triton kernels build a C helper on first use. The
service had no HOME (cache in read-only /.triton), no cc and no libcuda
path, so every request was HTTP 500. The cache goes in the private /tmp:
systemd mounts the DynamicUser state dir noexec, so a helper built there
fails to load ("failed to map segment").
Contributor
Author
|
Deployed to THEBATTLESHIP (generation 1078) and fixed what the first switch exposed:
|
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
Replaces
fleet.ai/ollayawithfleet.ai/laya(modules/ai/laya.nix): upstream laya-serve (NandhaKishorM/laya v0.4.21, its own NixOS module) on the same127.0.0.1:11435/v1/systemone, so the Paperclip router (STA-631) keeps working.laya-trainfine-tunes directly (settings.ai.laya.extraModels). Ollaya only runs ONNX graphs, and training on our own decisions is where Laya's accuracy comes from.cudawith at least 4 GiB free, elsecpu. A 2-minute timer restarts the service onto the other device when that changes: under 1 GiB free on the GPU moves it to the CPU, and 4 GiB free moves it back.Verified
nix build .#nixosConfigurations.THEBATTLESHIP.config.system.build.toplevelexits 0.laya-serve, run as cody on port 11439: it started on cuda with 12.7 GiB free, answered HTTP 200 with a 2-question choice, and warm requests took 19–44 ms (Ollaya on the CPU takes about 93 ms). It used 2.0 GiB VRAM and 3.0 GB RSS.flake.lock: only the newlayainput.systems_8andsystems_9swapped numbering; no revision changed.Notes
laya:en(Ollaya's name). laya-serve answers tolaya/english, so the router should switch tolaya.ollaya.serviceand startslaya-serve. Its first start downloads about 800 MB of weights.sudo nixos-rebuild switch --rollback.