LocalAI/pkg/model
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
..
filters.go fix: make sure to close on errors (#7521) 2025-12-11 14:03:20 +01:00
initializers.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
loader.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
loader_options.go feat: refactor build process, drop embedded backends (#5875) 2025-07-22 16:31:04 +02:00
loader_test.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
model.go chore(refactor): track grpcProcess in the model structure (#3663) 2024-09-26 12:44:55 +02:00
model_suite_test.go tests: add template tests (#2063) 2024-04-18 10:57:24 +02:00
process.go chore: update cogito and simplify MCP logics (#6413) 2025-10-09 12:36:45 +02:00
watchdog.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
watchdog_test.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00