1# @ajax/mesh-inferd
23meshd's side of an inference request: which members serve it, the call to their gpt2 worker, the answer.
45meshd's side of an inference request (inferd.rs).
67The pair: explicit (`prefill=K decode=J`, `mono=K`), or the members where the fleet's desired state placed gpt2-prefill and gpt2-decode (this member's committed copy, read from the `fleet` text), or a monolithic gpt2. Then one call to the decode (or monolithic) member's worker, which answers K_RESULT: the tokens, the text, the logits digest, the timings.
89```c
10#include "mesh/inferd.h"
11```
1213## Ported from
1415[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/inferd.rs: `members_of`, `param_of`, `run`.
1617## Tests
1819- `tests/inferd.c`: a gpt2 worker on loopback answers a mono request (the message meshd sends, the result it returns with coordinator, request_ms and program), its K_ERROR, a refused connection, and no member placed.
2021## Licence
2223MIT. See the repository's LICENSE.