Archived
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves every shipped container - Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime - /v1/messages works with Claude Code as it ships (gearwave00001) - a long agent conversation keeps its cached history when the client rewrites its last turn (manueloverride) - a stream's first event goes out with the first token, so llama-benchy measures prefill right - opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42) - four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b) - NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA adapters (baKon) - many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool arguments and the CPU's vision and audio encoders - plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
40 lines
1.5 KiB
C++
40 lines
1.5 KiB
C++
/* main.cpp -- the entry point: turns a command line into engine.h's startup sequence and a status
|
|
* into an exit code.
|
|
*/
|
|
#include "engine.h"
|
|
#include "hf_model.h"
|
|
#include "util/stallwatch.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
rad::Config cfg;
|
|
int s = rad::config_parse(argc, argv, &cfg);
|
|
if (s == 1) { rad::config_usage(argv[0]); return 0; }
|
|
if (s < 0) { rad::config_usage(argv[0]); return 2; }
|
|
|
|
if (!rad::resolve_hf_model(cfg)) return 1; /* a repo id: fetched, and --model points at it */
|
|
|
|
rad::Engine engine(std::move(cfg));
|
|
|
|
/* A startup that stops logging reports where it waits (util/stallwatch.h). Two minutes
|
|
* comfortably covers the slowest normal step, such as a container read from a slow disk. The
|
|
* watch goes on into serve() and ends when the server listens. */
|
|
auto watch = std::make_unique<rad::StallWatch>("startup", 120000);
|
|
s = engine.start();
|
|
if (s < 0 || engine.config().debug_graph) watch.reset();
|
|
if (s < 0) {
|
|
/* start() logged the error; the report adds the machine and the decisions made so far. */
|
|
engine.print_startup_report(s);
|
|
return 1;
|
|
}
|
|
|
|
if (engine.config().debug_graph) return engine.dump();
|
|
s = engine.serve(std::move(watch));
|
|
if (s < 0) {
|
|
/* serve() can also refuse before listening (e.g. a template default the template
|
|
* rejects, an unholdable thinking budget). */
|
|
if (!engine.startup_report_printed()) engine.print_startup_report(s);
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|