From af55803d0dff9eb692c760c8d486e736c945061d Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Sat, 27 Jun 2026 00:58:05 +0200 Subject: chore: clean up comment formatting and wording --- tools/server/models.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'tools/server/models.c') diff --git a/tools/server/models.c b/tools/server/models.c index 91aee18..2cb35a6 100644 --- a/tools/server/models.c +++ b/tools/server/models.c @@ -1,3 +1,16 @@ +/* Model load/lifecycle, plus tokenization and inference dispatch. + * + * Each loaded model owns resolved serving metadata for the operator-chosen + * label. + * + * Transformer behavior comes from model files through ffwd_config. + * Server-only facts missing from those files, such as output API family and + * Matryoshka floor, come from the load spec. + * + * tokenize_* and model_ffwd_* helpers are the request handlers' single dispatch + * point, hiding the compiled backend choice behind one signature. + */ + #include "server_internal.h" #include "util.h" @@ -8,17 +21,6 @@ #include #include -/* ======================================================================== - * Model load/lifecycle, and tokenize/inference dispatch - * - * Each loaded model owns resolved serving metadata for the operator-chosen - * label. Transformer behavior comes from the model files through ffwd_config; - * server-only facts absent from those files, such as output API family and - * Matryoshka floor, come from the load spec. The tokenize_* and model_ffwd_* - * helpers are the single dispatch point the request handlers call, hiding the - * compiled backend choice behind one signature. - * ======================================================================== */ - loaded_model *loaded_model_for_label(http_server *s, const char *label) { if (!label) return NULL; @@ -195,9 +197,8 @@ void rerank_request_free(rerank_request *r) { memset(r, 0, sizeof(*r)); } -/* Tokenization itself lives in libffwd (ffwd_tok). These thin wrappers only - * add the server's per-stage timing onto the job; the request handlers call - * them unchanged. */ +/* Thin wrappers that add server per-stage timing to the tokenization job. + * Request handlers call them unchanged. */ int tokenize_input( loaded_model *m, job *j, const char *text, const char *query_instruct, token_buf *out) { uint64_t t0 = nstime(); -- cgit v1.3.1