skip to content
==> include/mesh/inferd.h <==
1/* @ajax/mesh-inferd: meshd's side of an inference request (inferd.rs).
2 *
3 * The pair: explicit (`prefill=K decode=J`, `mono=K`), or the members where
4 * the fleet's desired state placed gpt2-prefill and gpt2-decode (this member's
5 * committed copy, read from the `fleet` text), or a monolithic gpt2. Then one
6 * call to the decode (or monolithic) member's worker, which answers K_RESULT:
7 * the tokens, the text, the logits digest, the timings. */
8#ifndef MESH_INFERD_H
9#define MESH_INFERD_H
10
11#include "mesh/infer_request.h"
12#include "mesh/infer_wire.h"
13#include "mesh/shared.h"
14
15/* One request: 0 and *res (free it with mesh_infer_msg_free), or -1 and *err. */
16int mesh_inferd_run(mesh_shared *sh, const mesh_infer_request *r, mesh_infer_msg *res, char **err);
17/* The members a program runs on: the desired state's `at` (all: every member), or 0 when single and loaded here. */
18size_t mesh_inferd_members_of(mesh_shared *sh, const char *name, uint32_t *out);
19
20#endif