Skip to content

WIP: (1/7) Add content-addressed local inference caches - #94

Draft
ErlisLushtaku wants to merge 3 commits into
cachefrom
cache-stack/01-local-store
Draft

WIP: (1/7) Add content-addressed local inference caches#94
ErlisLushtaku wants to merge 3 commits into
cachefrom
cache-stack/01-local-store

Conversation

@ErlisLushtaku

@ErlisLushtaku ErlisLushtaku commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Note

WIP: This cache stack is on hold until the task-YAML stack ending in #93 merges. The current implementation is not final and may change when it is adapted to the merged task runtime.

Adds content-addressed local SQLite caches for model completions and judge outputs.

Cache layout:

{store_root}/completions/{task}/{provider}/{model}/{descriptor_hash}/
├── metadata.json
└── completions.db

{store_root}/judgements/{task}/{provider}/{model}/{descriptor_hash}/
├── metadata.json
└── judgements.db

metadata.json stores the validated model descriptor. The databases use these schemas:

completions(
  input_hash TEXT PRIMARY KEY,
  input_text TEXT NOT NULL,
  completion TEXT NOT NULL,
  benchmark TEXT NOT NULL,
  instruction_id TEXT NOT NULL,
  model TEXT NOT NULL,
  pushed_by TEXT NOT NULL,
  pushed_at TEXT NOT NULL,
  run_id TEXT NOT NULL
)

judgements(
  input_hash TEXT PRIMARY KEY,
  judge_input TEXT NOT NULL,
  judge_completion TEXT NOT NULL,
  benchmark TEXT NOT NULL,
  instruction_id TEXT NOT NULL,
  model_a TEXT NOT NULL,
  model_b TEXT NOT NULL,
  judge TEXT NOT NULL,
  orientation TEXT,
  pushed_by TEXT NOT NULL,
  pushed_at TEXT NOT NULL,
  run_id TEXT NOT NULL
)

This is stacked on #71.

Introduce a minimal descriptor-hashed store contract with typed filter fields and last-write-wins upserts, without changing PR #71 runtime wiring.
Keep only row data used by the local cache and retain descriptor-content validation without redundant folder checks.
Retain writer, timestamp, and run identifiers for future shared-cache attribution while keeping content hashes as primary keys.
@ErlisLushtaku ErlisLushtaku changed the title (1/6) Add content-addressed local inference caches (1/7) Add content-addressed local inference caches Aug 14, 2026
@ErlisLushtaku ErlisLushtaku changed the title (1/7) Add content-addressed local inference caches WIP: (1/7) Add content-addressed local inference caches Aug 14, 2026
@ErlisLushtaku
ErlisLushtaku marked this pull request as draft August 14, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant