Commit Graph
6 Commits
Author SHA1 Message Date
Satya Devineni 13ed8c91bf Add GGUF zero-shot routers on llama.cpp: encoder in llama-server, rule head in lemond (#4096)
* Adding support for GGUF based zero-shot models

* CR feedback

* pr feedback: CI fix, file path bug

* pr feedback: local file edge cases incl missing ones

* pr feedback

* CR feedback

* pr feedback

* fixing local model heckpoints edge cases

* misleading directory checkpoint error

* pr feedback: scheme prefixed checkpoints and early label size gaurd
2026-11-10 15:58:15 +00:00
Satya Devineni 11a3ea0ac5 feat(backend): FLM 1.0.11 decision models support (#4037)
* main into zero shot, post refactoring

* cleanup

* cleanup

* CR feedback: fixed the residency document clarification bug

* cr feedback: fake tests with propoer assertions

* stacks on the zero shot work in 3952

* pr feedback: better policy checks and logging for backend failures

* pr feedback: adding on_truncation

* pr feedback: adding the truncation support for classifier and fixing documentation issues

* CI fix and doc enhancement

* pr feedback: fixed edge cases

* added check for 0.3.7 truncated verification

* pr feedback: router validation and argument handling

* Added the example lfm2 ONNX model

* pr feedback: added max-length and 3 flag truncate flags

* pin bump to 0.4.0 and more tests for zero-shot

* CI fix

* pr feedback: model level filtering

* PR Feedback: CR feedback

* restricting decision models based on model family. 8k context limit by default for encoder decision models

* checks at router level to reject wrongly labeled systemone models with 400

* systemone support through FLM 1.0.11

* added truncation FLM check

* pr feedback: truncated is set to false and better error handling with input lengths

* pr feedback: default set to 4k, limits passed down by llama-server, truncated  is added to systemone

* truncated documentation

* pr feedback: checks the token count instead of the template

* missing tests

* CI bugs
2026-11-05 00:01:33 +00:00
Satya Devineni d397a6e8fa Add SystemOne decision models: /v1/systemone, GGUF zero-shot on /v1/classify, and the systemone router classifier (#3956)
* main into zero shot, post refactoring

* cleanup

* cleanup

* CR feedback: fixed the residency document clarification bug

* cr feedback: fake tests with propoer assertions

* stacks on the zero shot work in 3952

* pr feedback: better policy checks and logging for backend failures

* pr feedback: adding on_truncation

* pr feedback: adding the truncation support for classifier and fixing documentation issues

* CI fix and doc enhancement

* pr feedback: fixed edge cases

* added check for 0.3.7 truncated verification

* pr feedback: router validation and argument handling

* Added the example lfm2 ONNX model

* pr feedback: added max-length and 3 flag truncate flags

* pin bump to 0.4.0 and more tests for zero-shot

* CI fix

* pr feedback: model level filtering

* PR Feedback: CR feedback

* restricting decision models based on model family. 8k context limit by default for encoder decision models

* checks at router level to reject wrongly labeled systemone models with 400

* pr feedback: default set to 4k, limits passed down by llama-server, truncated  is added to systemone

* truncated documentation

* pr feedback: checks the token count instead of the template
2026-11-04 05:34:34 +00:00
Atirna ce08204817 fix: dispatch image upscaling through backend capabilities (#3511)
* fix: dispatch image upscaling through backend capabilities

* backends: keep the upscale_via_cli name on the upscaler entry point

The name records that the server is not retained, which leaves room for a
resident upscaler mode alongside the one-shot case the API covers today.
2026-09-17 06:36:24 +00:00
fl0rianr e8b9659e09 test: migrate model registry label validation to C++ (#3285) 2026-08-21 23:52:04 +00:00
Jeremy FowersandClaude Opus 5 f9865cde78 feat(models): add an explicit chat label (#3099)
* feat(models): add an explicit `chat` label

Chat-ness was inferred in five inconsistent places: an allow-list in
get_model_type_from_labels plus three copy-pasted "non-chat label"
denylists. FastFlowLM has no chat marker at all -- 10 of its chat models
report no labels and only worked via a silent LLM fallback.

Make `chat` a first-class deployment label, stamped at every ingest
boundary that cannot declare it, and collapse the five inference sites
to one label test.

Also removes the deprecated `Lite Collection` / `Ultra Collection`
registry entries.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* feat(models): derive the deployment label from the backend descriptor

Each backend descriptor now declares a `default_classification`, and a single
`ensure_deployment_label(labels, recipe)` stamps it at every ingest path when a
model's own labels name no deployment mode. This replaces the recipe-blind
`ensure_chat_label`, which labeled a bare sd-cpp or whispercpp user model as
`chat`.

- Add the missing `chat` label to Muse-Glimmer-30B-GGUF.
- Check the registry invariant in CI (test/test_server_models_labels.py): every
  model declares exactly one modality, and it agrees with its recipe.
- Classify FastFlowLM models by checkpoint name, since `flm list --json` reports
  input modalities rather than a deployment mode (ROCm/FastFlowLM#668).
- Split get_model_type_from_labels() into find_deployment_mode() plus the
  LLM-fallback wrapper, so callers can tell "declares chat" from "declares
  nothing"; share one has_label() helper across the four ad-hoc idioms.
- Document all nine deployment labels and the recipe-default fallback.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* refactor(models): drop the descriptor-outranks-labels guard

The guard existed because `vision` / `reasoning` / `tool-calling` used to imply
chat, so an sd-cpp model labeled `vision` or an onnxruntime model labeled
`reasoning` typed as LLM and slipped past classifier-capability validation. With
`chat` as the sole chat marker and the recipe's classification stamped at ingest,
the only labels this could still override are ones a user typed by hand.

The `classification` fixup stays, since /v1/classify is served only by
onnxruntime; it now names that backend through its descriptor instead of relying
on the removed branch to have returned first.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(models): treat `chat-transcription` as a capability, not a mode

`chat-transcription` means a chat model takes audio in a chat turn and
transcribes it as part of its answer, so it sits with `vision` and
`tool-calling` rather than naming the LLM deployment mode — `chat` does
that. A model carrying only capability labels now falls through to its
recipe's default label.

Also: warn at cache build for any model that reaches a client with no
deployment label; restore the array/element type guards when reading
`labels` off a `/v1/models` response; describe the FLM discovery
workaround in terms of the actual `flm list --json` catalog; and correct
the deployment-label docs to match `get_deployment_model_type()`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* feat(models): declare each backend's supported deployment modes

Each backend descriptor now lists every deployment mode it can serve, most
default first, replacing `default_labels`, `default_classification` and the
editorial `modality` string. A model's labels are reconciled against that list
at ingest, so a label can no longer claim a mode its backend would reject at
inference time.

- `POST /pull` returns 400 and registers nothing when a definition names an
  unservable mode, via `labels` or the `embedding`/`reranking` parameters;
  collection imports reject the same definition before any component registers
- Naming no mode stays valid: the recipe's default is stamped, so an LLM always
  carries `chat` and clients can test one label instead of inferring from
  absence
- Deleted `get_deployment_model_type()`; label normalization runs on every
  ingest path, including the built-in cache build, so labels and ModelType
  cannot disagree
- `/system-info` derives `modality` from the declared modes, and `bench` reads
  them directly instead of parsing the display string back into a ModelType,
  which also fixes llamacpp embedding and reranking benchmarks
- `BackendModeContractTest` fails the build when a descriptor's declared modes
  disagree with the capability interfaces its server class implements

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(models): drop FastFlowLM's reranking claim

FLM serves no /v1/rerank route (v0.9.46 registers only chat/completions,
completions, embeddings, audio/transcriptions, models, version) and its
catalog has no reranking model, so `IRerankingServer` made the descriptor
advertise a mode nothing could satisfy.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* feat(models): refuse an illegal set of mode labels instead of repairing it

A label set either describes a model the backend can deploy or describes no
model at all: a mode the recipe cannot serve, or two different modes, is now
refused rather than normalized down to a winner. Two servable modes were the
gap — llama-server is spawned with --embeddings for an embedding model only, so
`["chat", "embeddings"]` advertised an endpoint the subprocess never had.

/pull answers 400 and registers nothing; a stored entry that predates the rule
is skipped at startup with an error naming it, leaving user_models.json untouched
so it can be corrected by hand. Dropping the repair also removes the question of
which mode wins, so labels and ModelType agree by construction.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-08-14 20:39:44 +00:00