docs: propose LuceEngine component boundaries - #690
Closed
Graffioh wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Superseded by draft implementation PR #692, which carries this RFC forward with the first owned-generation lifecycle slice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LuceEngine::generate()as the single local request-generation entry point for HTTP and daemon callersHttpServerModelBackendversusSeqEnginepeer structure withSingleRequestExecutorandBatchExecutorcapabilities belowLuceEngineHttpServer, and keep model-family state and GGML objects below the execution boundaryDesign
There is one request-level function named
generate(). The final target removesModelBackend::generate(),restore_and_generate(), and the HTTP worker-versus-scheduler branch.The two lower executor contracts remain different because they represent different units of model work. They are model capabilities below the shared request lifecycle, not alternate serving paths.
Boundaries
HttpServerowns routes, JSON validation, chat rendering, tokenization, sockets, heartbeats, SSE, and response JSON.LuceEngineowns the backend lifetime, request queue, scheduling mode, generation policy, bounded output, typed controls, and shutdown.BackendIpcProcessand role-specific IPC clients remain model implementation details.These are ownership boundaries. The design does not rely on C++ public or private access to define them.
Relationship to active refactors
BackendPlan -> create_backend() -> BackendRuntime;LuceEnginetakes ownership of that runtime.BackendPlanstays launch-time only.ServerConfigdoes not enter backend construction or model-family code.Scope
Documentation only:
docs/specs/engine-components.mdwith the revisedLuceEnginetargetThe RFC includes a staged migration. The first implementation step is an owned
GenerateRequestand a model-free boundedGenerationchannel test.Verification
upstream/main@298031aaBackendPlanandBackendRuntimerefactorgit diff --checkand checked balanced Markdown fences