Repository navigation
inference: resolve native text context capacity before admission (ABI v18) - #56
Merged
lalalune merged 1 commit intoOct 14, 2026
Merged
Conversation
…ABI v18) Add eliza_inference_llm_context_capacity, which loads the resident text model if needed and returns the context size llm_stream_open would use (requested, else ELIZA_LLM_N_CTX, else 8192, clamped to the GGUF training context) without allocating a decode context. llm_stream_open shares the same resolution and rejects a non-positive capacity. The new symbol bumps ELIZA_INFERENCE_ABI_VERSION to 18 (v17 is the Paradee/ASR-cancel surface from #59) with a v18 changelog entry. The FFI ABI tests expect "18" and cover the new entry's argument validation and missing-text-GGUF error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lalalune
force-pushed
the
fix/28432-context-capacity-cc0
branch
from
October 14, 2026 02:57
76dd0ca to
c6cceaa
Compare
lalalune
changed the base branch from
fix/bge-nonspacing-marks-31518
to
eliza/develop-pin-ea8b3f2
October 14, 2026 02:57
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.
Text consumers could admit a prompt against a guessed context window while the fused runtime selected a different environment default or GGUF training-context clamp. Add
eliza_inference_llm_context_capacityand use the same resolver in stream creation, so callers can obtain and explicitly pass the effective window before token admission. The resolver loads the resident model with the requested GPU placement and does not allocate a decode context.Rebased (2026-10-13): this is now a single commit directly on
eliza/develop-pin-ea8b3f2(c6e523b6, which includes #59's libelizainference ABI v17) and no longer depends on #52. Because #59 took v17, this additive capacity contract is renumbered to ABI v18:ELIZA_INFERENCE_ABI_VERSIONis 18, the header banner and changelog carry a v18 entry above #59's v17 entry, andeliza-inference-test-abi/eliza-inference-test-paradee-asrexpect"18".eliza-inference-test-abialso now checks the new entry's NULL-argument and missing-text-GGUF errors.Parent integration note: eliza's
packages/app-core/src/services/local-inference/voice/ffi-bindings.tsmust bump its expected ABI to18in the same gitlink bump that picks up this commit; a loader still expecting 17 will refuse to bind. Parent integration: elizaOS/eliza#28432.Local validation of the rebased commit (macOS arm64, CPU build,
-DLLAMA_BUILD_TESTS=ON):ctest -R eliza-inference-test2/2 passed (eliza-inference-test-abi25 checks,eliza-inference-test-paradee-asr518 checks, 0 failures). The validation list below was recorded by the earlier stacked revision76dd0ca5, whose capacity code is unchanged here.Validation on
76dd0ca5b189f1f1b5bd2f4014d06f8caec0540b:ELIZA_LLM_N_CTX=256resolves 256; explicit 128 resolves 128 for both models.The capital of France is. Four bounded output tokens producedParis.\n\nThe.MODEL_OUTPUT_INCOMPLETEand a complete oversized prompt withMODEL_PROMPT_TOO_LARGE. This also exposed and repaired a parent-side use of speculative acceptance statistics as output-token counts.26aff10fab6d48bd11d145f6fd1a2a78651df2dfroot verification passes all 381 tasks (0 cached, 8m9s), with source hashes unchanged. Scalar-reference self-test also passes: finite kernel outputs, fused-attention, TBQ V-cache and split-K online-softmax merge parity.The decode checks used CPU model placement in the source-built Metal-capable library. These are macOS host results, including the AOSP loader exercised on macOS; no Android device is attached. They do not qualify installed Android, CUDA, or #52's outstanding hosted GPU checks. No installed global library was replaced.
Exact artifact identities
76dd0ca5b189f1f1b5bd2f4014d06f8caec0540b; dirty fingerprint empty.500dcabd043f20576365c460eacd8e6924eabc1a8a9b642aaa2c580bf1ae3662.bge-small-en-v1.5-f16.gguf: SHA-256f0b2fef971e8366438bfd2d9aefea1b0115919389448806d290237f638bae999(67308128 bytes).gemma-3-270m-it-Q8_0.gguf: SHA-256d156a5159f2f79c1b1d53c7c1cc20f1ff28ab8d00f17a292620aad13399b9698(291546144 bytes).Prepared with Codex assistance under the repository owner's direction.
🤖 Generated with Claude Code