Skip to main content

Crate cerno_host

Crate cerno_host 

Source
Expand description

The seam between cerno and whatever runs the model.

A host knows nothing about Noul, Choice or Score. It answers exactly one question: given a prompt, what is the probability distribution over the first token the model would generate? All primitive logic lives in cerno-core and therefore holds for every host equally.

Two adapters cover the runtimes: OllamaHost for Ollama’s native API, and OpenAiCompatHost for everything speaking /v1/chat/completions. connect picks one from a HostKind.

Structs§

FirstTokenDistribution
The distribution over the first generated token.
FirstTokenRequest
One prompt, one token, full distribution.
HostCapabilities
What a host can and cannot do. cerno-core reads this to size its label alphabet.
OllamaHost
OpenAiCompatHost
UnknownHostKind

Enums§

Flavour
Which OpenAI-compatible runtime is on the other end.
HostError
HostKind
Which runtime a server talks to. One per process.

Traits§

ModelHost

Functions§

connect
Build the adapter for kind. Ollama takes no API key; the others send it as a bearer token.