Repository navigation
Refactor LFM3 Audio around shared LFM runtimes and weight helpers - #1210
Merged
Merged
Conversation
Consolidate model components, use framework weight stores and cached decoder/encoder runtimes, and remove inference debug code. Adapt component and model tests to the new boundaries. Validation: git diff --check. This refactor has not been built or tested.
Owner
Author
|
@ykhrustalev I did some refactoring to LFM3.0 to reuse the shared LFM runtimes and weight helpers, remove duplicated code, and clarify state ownership. Hopefully I haven’t missed anything important. Please let me know if you spot anything. A reusable S2S session-management template is next on my roadmap, since we already support several S2S models. |
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.
LFM3 Audio currently maintains parallel decoder, encoder, weight-loading, and state-management code alongside the shared LFM framework. This refactor makes it use the shared runtimes, with session-owned cached graphs and explicit state ownership.
Measurements
Main versus this refactor, using Q8_0 packages on RTX 5090 and Ryzen 9 7900X with eight CPU threads. Matched warmed requests were measured in main–refactor–refactor–main order. TTS covers short and approximately 1,000-character passages; the longer passage generates roughly one minute of audio. ASR/S2S inputs are 6–14 seconds.
RTF is the mean warmed request RTF; TTFA measures the first streamed audio received by the client. Peak VRAM is per process, including model loading and reloads. Warmups and reloads are excluded from timing averages.
Offline performance:
Streaming performance:
CPU inference uses host memory. Offline TTS peak RSS increased from 2,616 to 2,660 MiB; the other CPU paths stayed around 2.5–2.8 GiB.
Correctness and lifecycle