Repository navigation
feat: what taracode and the hardware board need from the engine (v0.2.0) - #1
Merged
Merged
Conversation
…t a reload or an unload stops
…s never load a model
…ding model waits for it
…en the daemon starts
…and keeps it to one line
…import at its own window
…s' windows and capabilities
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
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.
Summary
What taracode 3.3.0 and the RTX 5090 hardware board need from the engine, as v0.2.0.
path: a load records them, and a read of the model list records what a running model lacks, such as a model a
/v1request brought up on its own. A read never waits behind a load (it only tries the operations lock), therecording has a 10 s deadline of its own, and the answer comes from a second look at the router. Properties are
read with
autoload=false, so a read never makes llama-server load a model. A run whose memory cannot be measured(no process to measure, or a probe that sees none) is not probed again until the model stops.
POST /api/loadanswers at once for a model that sleeps at the requested window(its next request wakes it), and waits for a model that is still loading instead of refusing the load.
GET /api/loadedgains astatusfield,loadedorsleeping;taraengine psshows it in a STATUS column, andtaraengine loadandtaraengine doctorsay when a model sleeps.internal/gguf, reads the architecture andthe native context length from a GGUF header: little-endian versions 2 and 3, at most 16 MiB consumed, every
length and count checked before anything is read or skipped. An import takes its window from its file when it is
pulled, imports pulled by 0.1.0 get theirs when the daemon starts, and an import's default window is never larger
than its native one.
capabilities in
index.json, and the catalog shows them while the model does not run.pkg/client:Error.NotJSONmarks a refusal whose body is not the engine's error JSON; such a body becomesone line of at most 300 bytes.
GET /api/models/{name}carries keeps line breaks and tabs and drops every other controlcharacter.
Compatibility
pkg/api: one added field,Loaded.Status(omitempty).pkg/client: one added field at the end ofError.Older clients ignore both, and newer clients read zero values from 0.1.0.
index.jsongainsnative_contextandcapabilities, bothomitempty; 0.1.0 reads it without error.Verification
go test -race ./...: every package passes. The coverage gate holds every gated package at 100%, andinternal/ggufandinternal/backendjoin it.go vet -tags integration ./..., golangci-lint v2.14.0,scripts/hygiene.shand govulncheck are clean./v1before any load, after which/api/loadedshows the model loaded with its memory; and stories260K importedby
hf://into a daemon whose default window is 4096, which loads at the 2048 its header gives.Test plan
/v1without a load, then/api/loadedshows the model with its memory andstatus: loadedsleep_idle_secondsshowssleeping;POST /api/loadat its window answers at once,and the next request wakes it
GET /props?model=<id>&autoload=falseon the router answers 400 for a model that does not run, and answers asleeping one without waking it
on a loaded model reloads it at the new window
hf://import loads at 2048 on the NVIDIA host