Repository navigation
[Model] Support MOSS-TTS-local-v1.5 #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
18c8f1b
[Model] Support MOSS-TTS-local-v1.5
gcanlin 43218b3
Merge branch 'main' into moss-local-v1-5
gcanlin 94712f2
fix lint
gcanlin 4b7b42e
fix config
gcanlin 6964d5e
Fix talker batch bug
gcanlin e8c3bb7
Fix streaming stereo bug
gcanlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # MOSS-TTS-Local-Transformer-v1.5 (MossTTSLocalModel, n_vq=12, 48 kHz stereo) | ||
| # HF: OpenMOSS-Team/MOSS-TTS-Local-Transformer-v1.5 | ||
| # Codec: OpenMOSS-Team/MOSS-Audio-Tokenizer-v2 (48 kHz, stereo, channel-interleaved RVQ) | ||
| # Uses a 1-layer GPT2-style local depth transformer (no delay warm-up), reset every | ||
| # frame — same per-frame timing (80 ms/frame, 12.5 fps) as MOSS-TTS-Realtime. | ||
| async_chunk: true | ||
|
|
||
| connectors: | ||
| shm: | ||
| name: SharedMemoryConnector | ||
| extra: | ||
| shm_threshold_bytes: 65536 | ||
| codec_streaming: true | ||
| connector_get_sleep_s: 0.005 | ||
| connector_get_max_wait_first_chunk: 1000 | ||
| connector_get_max_wait: 300 | ||
| codec_chunk_frames: 15 # 15 frames * 80 ms/frame = 1.2 s chunks | ||
| codec_left_context_frames: 0 | ||
|
|
||
| stages: | ||
| - stage_id: 0 | ||
| max_num_seqs: 8 | ||
| gpu_memory_utilization: 0.60 | ||
| enable_prefix_caching: false | ||
| async_scheduling: true | ||
| max_num_batched_tokens: 4096 | ||
| max_model_len: 4096 | ||
| devices: "0" | ||
| output_connectors: | ||
| to_stage_1: shm | ||
| default_sampling_params: | ||
| temperature: 1.0 | ||
| top_p: 0.95 | ||
| top_k: 50 | ||
| max_tokens: 4096 | ||
| seed: 42 | ||
| repetition_penalty: 1.1 | ||
|
|
||
| - stage_id: 1 | ||
| max_num_seqs: 1 | ||
| gpu_memory_utilization: 0.15 | ||
| enforce_eager: true | ||
| enable_prefix_caching: false | ||
| async_scheduling: true | ||
| max_num_batched_tokens: 65536 | ||
| max_model_len: 65536 | ||
| devices: "0" | ||
| input_connectors: | ||
| from_stage_0: shm | ||
| default_sampling_params: | ||
| temperature: 0.0 | ||
| top_p: 1.0 | ||
| top_k: -1 | ||
| max_tokens: 65536 | ||
| seed: 42 | ||
| repetition_penalty: 1.0 |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, I think we really need to refactor the whole
serving_speech.py. To be honest, it's hard to read and maintain now. And it has 4000+ lines now. @linyueqian @Sy0307 @hsliuustc0106 @alex-jw-brooksThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can not agree more XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe proposaling a new RFC can be a good start for making this file clear and easy to reuse. Thoughts? @linyueqian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed. i try to refactor some but need more work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gcanlin completely agree, I have actually been meaning to refactor some of the entrypoints once I have some bandwidth. I think we need to decouple model specific code from individual entrypoints as much as possible. It will simplify this entrypoint a lot and make testing easier.
serving_chat is also quite hard to look at and 3.7k lines too 😬 I think we need to make sure tests are solid for current behavior and should simplify them both as soon as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets create a new RFC for that