refactor(framework): promote greedy Qwen decoder runtime and Qwen BPE bundle helpers - #555
Merged
Merged
Conversation
… bundle helpers Promotes the decoder graph scaffolding that greedy Qwen-family model ports each re-roll (qwen3_asr thinker, audio8_asr thinker, audio8_tts slow/fast decoders) into the framework: - runtime/GreedyQwenDecoderRuntime: prefill graph with optional set_rows embedding injection, static-cache step decode, KV state handoff, and the argmax/EOS loop, parameterized by GreedyQwenDecoderSpec (weight names, use_qk_norm, attention biases, packed QKV, tied LM head, decoder stack config). - tokenizers: load_qwen_bpe_tokenizer(bundle) and require_added_token_id(bundle, content), replacing per-family copies of the Qwen2 BPE bootstrap and special-token lookup. audio8_asr is refactored onto the runtime as the first in-tree consumer; its thinker shrinks from ~950 lines of graph code to a family-specific spec. Behavior verified unchanged: unit tests, raw-transcript golden test, and exact parity on Metal and CPU for short and 61 s clips. Stacked on the audio8_asr port; meant to land after both model PRs so the promotion has multiple consumers, with audio8_tts ported onto the runtime as a follow-up commit in the same change.
Owner
|
@gqf2008 PR merged. Thanks! |
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
Moves the greedy Qwen decoder runtime and the Qwen BPE bundle helpers out of the
audio8_asrcommunity model into the framework, so other Qwen-based families can reuse them instead of carrying their own copies.Changes
New framework pieces (moved from
src/community_models/audio8_asr/thinker.cpp):include/engine/framework/runtime/greedy_qwen_decoder.h/src/framework/runtime/greedy_qwen_decoder.cppinclude/engine/framework/tokenizers/qwen_bpe_bundle.h/src/framework/tokenizers/qwen_bpe_bundle.cppaudio8_asrkeeps using the same logic through the promoted runtime; the moved types are renamed to match their new home (ThinkerWeights->DecoderWeights,TextLayerWeights->DecoderLayerWeights, ...).CMakeLists.txtregisters the new sources.Verification
main(cherry-pick, no conflicts).audiocpp_cli,audiocpp_server.mainon the same input —assets/resources/b.wavtranscribes toSome call me nature. Others call me Mother Nature. I've been here for over four point five billion years, twenty-two thousand five hundred times longer than you.byte for byte on both trees, so the move does not change behaviour.