Repository navigation
chore: vendor qwen3_5vl libs from IRON#134 — map the tied lm_head embedding instead of a bf16 table (0.8B/2B/4B) - #901
Merged
Conversation
…un 41150478193 (Linux/Windows, XRT/HRX) Token embeddings of the tied-embedding Qwen3.5 checkpoints (0.8B, 2B, 4B) are read from a read-only mapping of model.q4nx and dequantized one row per token, instead of an unpacked vocab x dim bf16 table. Same values (bit-identical rows), about 0.5 / 1 / 1.2 GiB less host RAM, same speed. Docs: host-memory note on the three model cards. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What
Vendors the
qwen3_5vlengine libraries from FastFlowLM_IRON#134 (merged asa4b25ce6), CI run 41150478193: Linux and Windows, XRT and HRX (src/lib/{xrt,hrx}/libqwen3_5vl_npu.so,qwen3_5vl_npu.dll,.lib). sha256 of the vendored files equal the run's artifacts.For Qwen3.5 0.8B, 2B and 4B (their
model.q4nxhas nomodel.embed_tokens, only the tied q8_0lm_head), the engine used to unpack the wholelm_headinto a vocab x dim bf16 table (485 MiB / 970 MiB / 1.2 GiB of host RAM) and read one row per token. It now maps thelm_headtensor read-only frommodel.q4nxand dequantizes the one row on demand; a prompt's rows are hinted to the OS before prefill. The 9B has a BF16embed_tokensand is unchanged. Addresses the first two items of #807 for these models.Docs: host-memory note on the 0.8B, 2B and 4B model cards in
docs/docs/models/qwen.md.Results (Linux XRT, ctx 4096, this branch built locally with the vendored CI libs vs the previous libs)
--prefix-slots 0)Not tested locally: the Windows and HRX runtimes (built and benched by IRON CI).
Note: the loaded model's
model.q4nxstays mapped. On Windows it cannot be replaced or deleted while the model is loaded (documented on the model cards); Linux is unaffected because downloads write.partand rename.🤖 Generated with Claude Code