Repository navigation
Add D1-Omni audio decisions and reusable LFM runtimes - #1199
Merged
Merged
Conversation
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.
Adds Liquid AI's d1-Omni-2B audio decisions as the
lfm_d1_omnifamily. Theclstask accepts audio and named questions, returning calibrated yes/no, single/multiple-choice, score, and numeric-estimate answers. It loads the official main/mmproj GGUF pairs directly, with Q8_0, F16, and BF16 package entries.Adds reusable
LfmDecoderRuntimeandLfm3AudioEncoderRuntime. The decoder shares layer math between full-sequence execution and independent causal decode sessions, with persistent KV/short-convolution state, cached prefill/step graphs, backend-only cache growth, and device outputs. The audio encoder accepts prepared features and returns device embeddings. Checkpoint binding, weight ownership, preprocessing, questions, and calibration remain model-local. D1 uses full-sequence execution with its own visibility masks; existing LFM audio implementations are unchanged.Includes the model license, usage guide, README entry, and speech-analysis routing entry.
Validation
lfm_d1_omni.attention=autopass a real CUDA Q8_0 smoke test.Performance
A warmed 14.1-second speech request with five mixed questions, using the official Q8_0 main/mmproj pair and eight CPU threads. Debug build; RTX 5090 for CUDA/Vulkan and Ryzen 9 7900X for CPU. Session latency includes feature extraction and inference, excluding model loading and file I/O. These are individual warmed requests, not repeated-run averages.