Skip to content

Study Google's recent KV cache compression/quantization research for K80 adoption #99

Description

@dogkeeper886

Goal

Survey Google's recent research on KV cache compression and quantization, and assess what could be adopted into ollama37 to reduce VRAM pressure on Tesla K80 (compute capability 3.7, 2x12 GB VRAM per card).

Why this matters for 3.7

K80 is VRAM-bound: long-context inference is capped by KV cache size well before compute becomes the bottleneck. If Google's techniques land model quality at a fraction of the KV footprint, we can:

  • fit longer contexts on a single K80 pair
  • run larger models without offloading KV to CPU
  • reduce PCIe Gen3 x16 traffic during decode

Scope of study

Target: published Google Research / DeepMind work on KV cache reduction. Candidates to investigate (non-exhaustive — expand during the survey):

  • KV cache quantization (per-channel / per-token schemes)
  • KV cache eviction / sparsity (e.g., attention-score-based retention)
  • Grouped-query and multi-query attention variants
  • Low-rank / shared KV projections
  • Hybrid local+global attention (sliding window) as it interacts with KV footprint
  • Any FP8 / INT4 KV work compatible with sm_37 (no native FP8 — must emulate or skip)

Deliverables

  • docs/research/google-kv-survey.md — summary of each technique: method, reported accuracy/perf, implementation complexity
  • Feasibility table: each technique vs. sm_37 constraints (no tensor cores, no FP8, no bfloat16 native, CUDA 11.4)
  • Recommendation: 1-2 techniques worth prototyping, with rationale
  • Integration sketch: where in ollama37 / llama.cpp / GGML the change would land (attention kernels, KV buffer allocation, graph ops)

Out of scope

  • Actual implementation — this is a study issue. Prototype work will be tracked in a follow-up issue based on the recommendation.

References to seed the search

  • Google Research blog (research.google/blog) — filter for KV cache, attention, long context
  • DeepMind publications on efficient inference
  • arXiv: search authors affiliated with Google/DeepMind on KV compression

Acceptance criteria

  • Survey doc merged
  • Recommendation is specific enough to open a prototype issue with a concrete implementation target

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions