Skip to content

fix(llm): the embedding runner on ollama-48gib-slow loads with the context 32768, not the 8192 that the gateway sends #2089

Description

@dan-petty

What happened

On 2026-10-24, kubectl -n llm exec ds/ollama-48gib-slow -c ollama -- ollama ps showed qwen3-embedding:0.6b loaded with the context 32768 and the size 5.2 GB, with the expiry Forever.

The gateway sends num_ctx: 8192 with each embedding call to this tier (k8s/llm/gateway/config.yaml). Its comment says that without it, Ollama loads the embedder with 32,768 tokens: 5.2 GB, not 2.9 GB. So a call that sent no num_ctx loaded this runner, and the tier keeps every runner loaded for good (OLLAMA_KEEP_ALIVE: "-1", #1064). The runner holds about 2.3 GB more VRAM than the plan, on the tier that also keeps qwen3.8:27b loaded.

What should happen

The embedding runner on ollama-48gib-slow loads with the context 8192, or with the context of the plan. Find the caller that loads it without num_ctx, for example devops ai prewarm, a direct embedding call, or the LiteLLM health check of the embedding deployment. Fix it at that caller, then check ollama ps again.

Evidence

  • ollama ps on ollama-48gib-slow (read-only), 2026-10-24: qwen3-embedding:0.6b 5.2 GB 100% GPU 32768 Forever.
  • ollama-48gib-slow sets OLLAMA_CONTEXT_LENGTH: "128000", so a call that sends no num_ctx gets the model's full context, 32768.
  • The order-2 embedding deployment of ollama-48gib-slow sends num_ctx: 8192.

Scope

Find the caller first. Do not change the tier's keep-alive.

Activity

  1. added
    source/agent
    type/bug
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/bug. The candidate describes an incorrect behavior in how the embedding runner loads with a wrong context size.
    • Priority: P2-Medium. The issue affects resource usage but does not block functionality or introduce a security risk.
    • Value: Medium. Correcting the context size improves VRAM usage efficiency for one tier in the system.
    • Effort: Low. Fixing requires identifying and correcting the caller that loads the model without num_ctx, which is a targeted change.
    • Related: fix(k8s): the gateway spreads embedding batches over both order 1 tiers, not only the first #2027, which asks for a different change. Both items deal with embedding runners on ollama-48gib-slow, but one fixes the context size while the other addresses batch distribution across tiers.
  3. added a commit that references this issue on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/bug

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions