Repository navigation
ONNX backend: 1bit serve --device onnx runs ONNX Runtime GenAI models (ryzenai-server) - #100
Merged
Merged
Conversation
…ime GenAI) third_party/ryzenai-server (lemonade-sdk, MIT) is the engine's ONNX Runtime GenAI backend, run as a child like llama-server. scripts/build-onnx.sh builds it against Microsoft's ONNX Runtime GenAI 0.11.2 and ONNX Runtime 1.23.2 (MIT, pinned, sha256-checked; CPU), or AMD's Ryzen AI Software when RYZENAI_INSTALL_PATH names it (NPU, hybrid). -DONEBIT_ONNX builds it with the engine. A directory with a genai_config.json goes to --device onnx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
pushed a commit
that referenced
this pull request
Oct 13, 2026
…e live mechanism bounded_key_value_token_count appears 24 times in the faulting pin (26330cc20) and 24 times in the current pin (0e255d7) - identical. The token-bound masking that the 'rows past the sequence end hold whatever an earlier request left there' comment describes was therefore ALREADY PRESENT when the fault reproduced (the faulting cell ran at gtt_start=102G with parse=0). That comment is the rationale for the #314 fix, not evidence of a live defect; the kernel reads key/value only up to the bounded count and masks scores accordingly. Recorded so it is not re-explored. What survives from the trail is only the merge message's phrase 'looser arena reuse', which points at the allocation/reuse boundary generally rather than at this kernel. Also settled: the sole change to ggml-hrx.cpp between the faulting pin and the current pin removes a return false for IQ3_S/IQ4_NL GET_ROWS, i.e. PR #100 enables an op the faulting pin refused - unrelated to the reuse boundary, and evidence that the faulting configuration is otherwise carried forward unchanged, consistent with the fault still reproducing. Add-only.
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.
1bit serve --device onnxserves ONNX Runtime GenAI models, the format of Lemonade's ONNX models. A directory with agenai_config.jsongoes there on its own. Seedocs/onnx.md.How it works
third_party/ryzenai-server(lemonade-sdk/ryzenai-server, MIT) is pinned at 69765cc. It is an OpenAI-compatible server around ONNX Runtime GenAI, and the engine runs it as a child process, exactly as it runs llama-server.scripts/build-onnx.shbuilds it against Microsoft's ONNX Runtime GenAI 0.11.2 and ONNX Runtime 1.23.2 (MIT), fetched pinned and sha256-checked, which gives CPU execution.-DONEBIT_ONNX=ONruns the script during the engine build.RYZENAI_INSTALL_PATHset, the same script builds against the user's install.DT_RPATH $ORIGIN, so ONNX Runtime GenAI's run-timedlopenoflibonnxruntime.sofinds the copy beside it.Tested on Strix Halo, from a clean clone with
-DONEBIT_ONNX=ON, onamd/Qwen2.5-0.5B-Instruct-quantized_int4-float16-cpu-onnx(CPU int4), with no--device:1bit serve -m <dir>choseonnx. It answered "The capital of France is Paris." and a list of three colors at 125–129 tok/s, and streamed SSE./v1/modelsreports deviceonnx, and stopping1bit servestopped the backend.The next step is
ryzenai-server.exeinscripts/build-windows.sh(ONNX Runtime GenAI's Windows builds add DirectML).🤖 Generated with Claude Code