Skip to content

feat(llm): use Lemonade's auto_evict policy instead of working around eviction (unlocked by v2026.39.1) #4170

Description

@kovtcharov

Lemonade v2026.39.1 adds VRAM-aware auto-eviction (auto_evict, auto_evict_threshold_pct) and — separately — stops erasing the llama.cpp prompt cache when a model goes soft-idle. GAIA currently has no way to express eviction policy, so it works around eviction instead.

Why this matters here. Model eviction is a recurring source of GAIA bugs, not a hypothetical. RAGSDK scopes its embedder unload specifically so a global /unload can't evict the chat model (#1544); the non-streaming chat path had to regain a reload check after the embedder warm-up evicted the model (#1030); and ModelSlotBroker (src/gaia/daemon/broker.py) exists to serialise sidecar loads so they don't race-evict the slot. Each of those is GAIA compensating for eviction it cannot see or control.

Two concrete wins worth scoping:

  • Let GAIA set an eviction policy rather than defending against the default, and pin the behaviour in tests/integration/test_lemonade_model_residency.py — which already exists to stop this being re-litigated from assumption.
  • Prompt-cache survival across soft-idle should cut the ~100s cold-reload cost that test documents for agent switching.

Needs measurement before design: confirm on AMD GPU hardware what the thresholds actually do under GAIA's one-LLM-plus-embedder residency pattern.

Proposed from the Lemonade v2026.39.1 release scan; maintainer triage decides scope. cc @kovtcharov-amd

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions