Repository navigation
yue2: export the semantic token stream as a result artifact - #635
Merged
Merged
Conversation
export_semantic=true attaches the semantic stage output as a `semantic` artifact next to `score`: a flat JSON array of codec indices, one per frame. The CLI writes semantic.json with --out-dir; the server returns it with the other artifacts. Default off; model-local; a request's audio is unchanged either way.
Owner
|
@mirek190 Turns out you were right 😄 Semantic token import/export does have a real use case. |
Contributor
😄 yay PR 596 |
Owner
|
@engival Merged! Thanks! |
Owner
|
@engival BTW let's just use json. No need to support npy. |
Contributor
Author
Yeah, I didn't include npy in any of the code. There's a trivial 1 liner in the md file showing how to convert between it in python, which enables compatibility with the reference implementation. |
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.
Follow-up to #561, for the second half of the AR stream.
export_semantic=trueattaches a semantic artifact next to score. It is the semantic stage output as a flat JSON array of codec indices: one integer per frame (25 frames/s), each in [0, 32768], with no stop token. With --out-dir the CLI writes semantic.json. The server returns it in artifacts like any other. It is off by default, so a request that doesn't set the option is unchanged.Why: it's the first step toward saving a take and continuing from it later. A follow-up PR adds a semantic_prefix request option.
Scope: model-local (src/models/yue2/, include/engine/models/yue2/), plus the spec entry, the docs and one path-test case. No framework, file-sink, server or WebUI changes.
Validation (Vulkan, Intel Arc Pro B70; cot=full, semantic_max_tokens=640, 8 steps, seed 1234):
Open question: would you prefer a different payload format? I picked a readable JSON array because it round-trips through the CLI, server and WebUI with no changes to any of them. It will also be accepted as-is by the follow-up input option. The reference pipeline's semantic.npy could be accepted as an additional input format later if you want it.
I could follow-up with a new PR to add an npy parser.