LocalAI/core/backend
Ettore Di Giacinto fc5b9ebfcc
feat(loader): enhance single active backend to support LRU eviction (#7535)
* feat(loader): refactor single active backend support to LRU

This changeset introduces LRU management of loaded backends. Users can
set now a maximum number of models to be loaded concurrently, and, when
setting LocalAI in single active backend mode we set LRU to 1 for
backward compatibility.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* chore: add tests

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Update docs

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Fixups

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-12-12 12:28:38 +01:00
..
backend_suite_test.go feat: extract output with regexes from LLMs (#3491) 2024-09-13 13:27:36 +02:00
detection.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
embeddings.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
image.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
llm.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
llm_test.go feat(backends): add system backend, refactor (#6059) 2025-08-14 19:38:26 +02:00
options.go feat: add support to logitbias and logprobs (#7283) 2025-11-16 13:27:36 +01:00
rerank.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
soundgeneration.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
stores.go feat: refactor build process, drop embedded backends (#5875) 2025-07-22 16:31:04 +02:00
token_metrics.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
tokenize.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
transcript.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
tts.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
vad.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
video.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00