Skip to content

WIP: (2/7) Cache inference at do_inference - #95

Draft
ErlisLushtaku wants to merge 9 commits into
cache-stack/01-local-storefrom
cache-stack/02-do-inference
Draft

WIP: (2/7) Cache inference at do_inference#95
ErlisLushtaku wants to merge 9 commits into
cache-stack/01-local-storefrom
cache-stack/02-do-inference

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.

Moves cache lookup and writes to do_inference.

  • PreparedModel defers backend construction until an input misses the cache.
  • Cache identity combines the canonical model input with the validated model descriptor.
  • Mixed batches run only missing inputs and restore the original output order.
  • Completion and judgement cache classes define their own stored rows.

This is stacked on #94.

Introduce PreparedModel and InferenceCache so full hits skip backend materialization, and wire one generate-and-judge path through content-addressed stores.
Keep only the lazy materialization fields needed for cache hits, and canonicalize inputs directly in do_inference.
Add short docstrings clarifying cache-identity preparation and miss-only backend materialization.
Handle only strings and LangChain chat prompt values used by current inference paths.
Remove silent cache fallbacks, share vLLM sampling defaults, and keep execution-only engine settings out of content descriptors.
Preserve the provenance required by the local store while keeping cache lookup and model materialization unchanged.
Replace role strings and conditionals with dedicated inference-cache subclasses while keeping SQLite persistence independent from inference orchestration.
@ErlisLushtaku ErlisLushtaku changed the title (2/6) Cache inference at do_inference (2/7) Cache inference at do_inference Aug 14, 2026
@ErlisLushtaku ErlisLushtaku changed the title (2/7) Cache inference at do_inference WIP: (2/7) Cache inference at do_inference 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