Skip to content

Expose the inference pipeline - #105

Merged
bsbodden merged 3 commits into
mainfrom
agent/inference-api
Aug 4, 2026
Merged

Expose the inference pipeline#105
bsbodden merged 3 commits into
mainfrom
agent/inference-api

Conversation

@bsbodden

@bsbodden bsbodden commented Aug 4, 2026

Copy link
Copy Markdown
Member

What changed

  • add an owning InferencePipeline that exposes tokenizer, metadata, active context state, structured prefill, forward logits, reset, checkpoint, rewind, and normal generation
  • expose runtime context capacity independently from the model-declared maximum
  • preserve the generation prefix-cache invariant when callers use low-level context operations
  • document the advanced inference path and prepare release 0.2.6

Why

The low-level backend primitives existed, but users had no coordinated, discoverable API for the complete inference pipeline. Applications that need llama.cpp-style control should not have to choose between the high-level generation loop and unsafe direct backend access.

Impact

Existing TextGenerationModel and backend APIs remain source-compatible. Applications can opt into InferencePipeline; the pipeline owns and closes its backend.

Validation

  • ./gradlew check verifyReleaseMetadata --no-daemon --stacktrace
  • ./gradlew verifyPublishingConfigured verifyReleaseDependencies aggregateJavadoc --no-daemon --stacktrace
  • ./gradlew :docs:build --no-daemon --stacktrace from a normal clone
  • focused Models API, runtime, Java backend, and native backend tests

@bsbodden
bsbodden marked this pull request as ready for review August 4, 2026 16:10
@bsbodden
bsbodden merged commit e4a527c into main Aug 4, 2026
31 checks passed
@bsbodden
bsbodden deleted the agent/inference-api branch August 4, 2026 17:11
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