Skip to content

feat(api): add non-generative task RPCs - #19

Merged
connorcarpenter15 merged 3 commits into
mainfrom
feat/non-generative-tasks
Jul 12, 2026
Merged

connorcarpenter15 merged 3 commits into
mainfrom
feat/non-generative-tasks

Conversation

@connorcarpenter15

@connorcarpenter15 connorcarpenter15 commented Jul 10, 2026 •

Copy link
Copy Markdown

Summary

  • add typed Embed, Classify, and Score RPCs to the existing OpenEngine service
  • add common task inputs, dense and sparse embedding tensors, batch correlation, task usage, and grouped query/candidate scoring
  • add per-model, per-task capability discovery for inputs, granularities, value semantics, normalization, limits, modalities, priority, and LoRA
  • organize the schema by ownership:
    • input.proto owns shared text, token, and multimodal inputs used by generation and non-generative tasks
    • generation.proto owns generation requests, parameters, streamed events, and usage
    • embedding.proto, classification.proto, and scoring.proto own their task-specific capabilities and messages
    • tasks.proto contains only shared non-generative request and output vocabulary
    • model.proto owns the aggregate TaskCapabilities discovery record
  • document batch-atomic lifecycle, validation, score semantics, and deterministic gateway-side reranking

Why

Generate cannot represent embeddings, classifier outputs, reward values, or model-native pair scores. Distributed frameworks therefore need engine-specific side channels for common non-generative inference.

This change establishes a portable typed surface across TensorRT-LLM, SGLang, and vLLM. It deliberately keeps reranking out of the engine protocol: gateways derive it from scalar Score results by stable-sorting, limiting, and reattaching gateway-owned documents.

The file layout keeps generation independent from task semantics while giving every inference path a focused evolution boundary. Generation-only parameters remain with the generation contract instead of creating a one-consumer file.

Closes #10.

Validation

  • buf build
  • buf lint
  • buf format --diff --exit-code
  • Buf WIRE compatibility against origin/main
  • Protobuf descriptor compilation with protoc
  • Markdown lint
  • Documentation link check
  • Commits include DCO sign-offs

Buf's default FILE compatibility category reports the intentional relocation of existing messages into their new owner files and deletion of generation_params.proto. Their fully qualified protobuf names, field numbers, and wire encodings are unchanged. OpenEngine is pre-adoption and current main does not publish generated modules, so this PR makes those source-layout changes before clients adopt it.

Protocol checklist

  • The canonical schema and API documentation are synchronized
  • Presence, defaults, and invalid states are defined
  • Acceptance, unary terminal, cancellation, and error behavior are defined
  • Discovery and capability impacts are documented
  • Wire compatibility against origin/main is preserved
  • Intentional source-level schema rewrites are called out explicitly

Additional context

  • Issue [Protocol]: Add portable non-generative inference task RPCs #10 was revised before implementation to retain Score and define Rerank as derived gateway/client behavior.
  • Successful task batches are atomic and preserve request order while also returning presence-aware original indexes.
  • Scalar, vector, and token-level scores cover native relevance/similarity, classifier/reward outputs, and causal label-token scoring.

Connor Carpenter added 3 commits July 10, 2026 13:23
@connorcarpenter15
connorcarpenter15 marked this pull request as ready for review July 12, 2026 17:25
@connorcarpenter15
connorcarpenter15 merged commit d0f29fe into main Jul 12, 2026
5 checks passed
@connorcarpenter15
connorcarpenter15 deleted the feat/non-generative-tasks branch July 12, 2026 17:25
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.

[Protocol]: Add portable non-generative inference task RPCs

1 participant