LFM3-Audio-2B Core AI LM: initial release for FluidAudio LFM3AudioManager (FluidAudio #49)
Browse filesCore AI LM bundle (uint8 b32, layers 20-23 fp16) for FluidAudio's .coreAI backend (FluidInference/FluidAudio branch feat/lfm3-audio, PR to follow). Request: https://github.com/FluidInference/FluidAudio/issues/49#issuecomment-6501658263. Encoder / depth / codec: FluidInference/lfm3-audio-2b-coreml.
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
coreai/LFM3-Audio-u8b32-f16L20-23.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LFM Open License v1.0
|
| 2 |
+
|
| 3 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
+
|
| 5 |
+
1. Definitions.
|
| 6 |
+
|
| 7 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by this document.
|
| 8 |
+
|
| 9 |
+
"Licensor" shall mean Liquid AI, Inc.
|
| 10 |
+
|
| 11 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 12 |
+
|
| 13 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 14 |
+
|
| 15 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 16 |
+
|
| 17 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 18 |
+
|
| 19 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
| 20 |
+
|
| 21 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 22 |
+
|
| 23 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 24 |
+
|
| 25 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 26 |
+
|
| 27 |
+
"Commercial Use" shall mean any use of the Work for direct or indirect commercial advantage or monetary compensation.
|
| 28 |
+
|
| 29 |
+
"Qualified Non-Profit Organization" shall mean a Legal Entity that is organized and operated exclusively for religious, charitable, scientific, testing for public safety, literary, or educational purposes, and which is exempt from federal income tax under Section 501(c)(3) of the United States Internal Revenue Code of 1986, as amended, or any equivalent non-profit or charitable organization in a foreign jurisdiction.
|
| 30 |
+
|
| 31 |
+
"Non-Commercial or Research Purposes" shall mean purposes that do not involve any use of the Work or a Derivative Work for Commercial Use.
|
| 32 |
+
|
| 33 |
+
"Threshold" shall mean annual revenue of 10 million United States dollars ($10,000,000) or more.
|
| 34 |
+
|
| 35 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 36 |
+
|
| 37 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, including the Commercial Use limitation set forth in Section 5, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 38 |
+
|
| 39 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 40 |
+
|
| 41 |
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 42 |
+
|
| 43 |
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 44 |
+
|
| 45 |
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 46 |
+
|
| 47 |
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 48 |
+
|
| 49 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 50 |
+
|
| 51 |
+
5. Commercial Use Limitation.
|
| 52 |
+
|
| 53 |
+
(a) The rights granted under this License for Commercial Use are conditioned upon You or Your Legal Entity not exceeding the Threshold.
|
| 54 |
+
|
| 55 |
+
(b) Any Commercial Use of the Work or a Derivative Work by a Legal Entity that exceeds the Threshold is not licensed under this Agreement.
|
| 56 |
+
|
| 57 |
+
(c) The Threshold shall not apply to a Qualified Non-Profit Organization's use of the Work or a Derivative Work for Non-Commercial or Research Purposes.
|
| 58 |
+
|
| 59 |
+
6. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 60 |
+
|
| 61 |
+
7. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except for the reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 62 |
+
|
| 63 |
+
8. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 64 |
+
|
| 65 |
+
9. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 66 |
+
|
| 67 |
+
10. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 68 |
+
|
| 69 |
+
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 70 |
+
|
| 71 |
+
END OF TERMS AND CONDITIONS
|
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: lfm1.0
|
| 4 |
+
license_link: LICENSE
|
| 5 |
+
base_model: LiquidAI/LFM3-Audio-2B
|
| 6 |
+
library_name: fluidaudio
|
| 7 |
+
pipeline_tag: automatic-speech-recognition
|
| 8 |
+
tags:
|
| 9 |
+
- coreai
|
| 10 |
+
- apple-silicon
|
| 11 |
+
- asr
|
| 12 |
+
- tts
|
| 13 |
+
- text-to-speech
|
| 14 |
+
- on-device
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# LFM3-Audio-2B language model for Core AI
|
| 18 |
+
|
| 19 |
+
The language model of [LiquidAI/LFM3-Audio-2B](https://huggingface.co/LiquidAI/LFM3-Audio-2B) as a Core AI bundle
|
| 20 |
+
(`.aimodel`, macOS 27 / iOS 27) for [FluidAudio](https://github.com/FluidInference/FluidAudio)'s
|
| 21 |
+
`LFM3AudioManager` with `backend: .coreAI`. The audio encoder, depth decoder and codec come from
|
| 22 |
+
[FluidInference/lfm3-audio-2b-coreml](https://huggingface.co/FluidInference/lfm3-audio-2b-coreml) and stay on Core ML
|
| 23 |
+
(the codec and the LiveASR encoder run on the Neural Engine there).
|
| 24 |
+
|
| 25 |
+
This is a modified version of the original model: the backbone was exported to Core AI and quantized (see below).
|
| 26 |
+
|
| 27 |
+
## Files
|
| 28 |
+
|
| 29 |
+
| File | What |
|
| 30 |
+
|---|---|
|
| 31 |
+
| `coreai/LFM3-Audio-u8b32-f16L20-23.aimodel` | LFM3 backbone (2048 x 24) taking `inputs_embeds`; entrypoints `prefill` (state update), `main` (logits of the last row), `hidden` (final-norm hidden of the last row, for speech frames); states `keyCache` / `valueCache` / `convStates`. 2.16 GB |
|
| 32 |
+
|
| 33 |
+
Quantization: asymmetric uint8 weights with block size 32, decoder layers 20-23 kept in fp16. Plain int8 (per
|
| 34 |
+
channel or per block) is fine for ASR but flips too many speech codes in TTS; the last layers carry most of that error.
|
| 35 |
+
|
| 36 |
+
## Use (Swift)
|
| 37 |
+
|
| 38 |
+
```swift
|
| 39 |
+
import FluidAudio
|
| 40 |
+
|
| 41 |
+
let manager = try await LFM3AudioManager.downloadAndLoad(backend: .coreAI) // macOS 27 / iOS 27
|
| 42 |
+
let text = try await manager.transcribe(samples).text
|
| 43 |
+
let speech = try await manager.synthesize("Hello from Core AI.")
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
FluidAudio loads one `AIModel` per entrypoint, all bound to the same host-owned states: with a single shared
|
| 47 |
+
`AIModel`, macOS 27.0 aborts in `GPUMemrefOps` ("Failed to resolve dynamic dimensions for memref.alloc") when one
|
| 48 |
+
function runs twice at consecutive positions with the same row count and another function is then called with the
|
| 49 |
+
next shape (the first `main` after speech frames in TTS). The first load specializes the graph for the GPU and
|
| 50 |
+
caches it (~3.3 GB under `~/Library/Caches/coreai-cache`).
|
| 51 |
+
|
| 52 |
+
## Parity (vs the original fp32 model)
|
| 53 |
+
|
| 54 |
+
| Check | Result |
|
| 55 |
+
|---|---|
|
| 56 |
+
| ASR, 20 golden LibriSpeech clips (greedy) | 18/20 token-identical (2 differ by a comma), WER 1.46% = original |
|
| 57 |
+
| TTS, 319 teacher-forced speech frames | LM hidden cosine min 0.99988 / mean 0.999985; depth-decoder codes 98.35% identical |
|
| 58 |
+
|
| 59 |
+
## Speed and accuracy
|
| 60 |
+
|
| 61 |
+
Apple M5 Pro (24 GB), macOS 27.0, FluidAudio release build; wall time includes warm-up after load.
|
| 62 |
+
|
| 63 |
+
| Task | Data | Result |
|
| 64 |
+
|---|---|---|
|
| 65 |
+
| Offline ASR | LibriSpeech test-clean, first 100 utterances (901 s) | WER 1.32%, RTFx 24.6 (Core ML LM: 18.4); 98/100 transcripts identical to the original model |
|
| 66 |
+
| LiveASR (160 ms pieces) | LibriSpeech test-clean, first 20 utterances | WER 1.46%, RTFx 13.3 (Core ML LM: 10.4) |
|
| 67 |
+
| TTS | 20 phrases (71 s of speech) | RTFx 4.28, first audio 37 ms (median), Parakeet round-trip WER 2.5% |
|
| 68 |
+
|
| 69 |
+
ASR peak memory footprint: 1.9 GB. TTS is bound by the LM step (fp16 last layers); the Core ML LM is slightly faster
|
| 70 |
+
there (RTFx 4.48).
|
| 71 |
+
|
| 72 |
+
## License
|
| 73 |
+
|
| 74 |
+
[LFM Open License v1.0](LICENSE) (Liquid AI). Commercial use by organizations with annual revenue of USD 10 million or
|
| 75 |
+
more requires a separate license from Liquid AI; see the license for the full terms.
|
| 76 |
+
|
| 77 |
+
## Changelog
|
| 78 |
+
|
| 79 |
+
| Date | Files | Change | Issue | FluidAudio PR | HF commit |
|
| 80 |
+
|---|---|---|---|---|---|
|
| 81 |
+
| 2026-10-29 | all | Initial release: Core AI LM bundle (uint8 b32, layers 20-23 fp16) | [FluidAudio #49](https://github.com/FluidInference/FluidAudio/issues/49#issuecomment-6501658263) | TBD | this commit |
|
coreai/LFM3-Audio-u8b32-f16L20-23.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!�_y�'�w�͡�bwUeT�����Zۆ�s�� �
|
coreai/LFM3-Audio-u8b32-f16L20-23.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21d95f79fa27fe77a1cda1d26277556554e4e7e6f4fe5adb86d1738080099820
|
| 3 |
+
size 2158672384
|
coreai/LFM3-Audio-u8b32-f16L20-23.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"assetVersion" : "2.0",
|
| 3 |
+
"producer" : "coreai-core 1.0.0b3",
|
| 4 |
+
"author" : "Liquid AI (Core AI port: model-lab\/lfm3)",
|
| 5 |
+
"creationDate" : "20261029T173954Z",
|
| 6 |
+
"license" : "LFM Open License v1.0",
|
| 7 |
+
"description" : "LiquidAI\/LFM3-Audio-2B text decoder, Core AI macOS GPU export (u8_f16L20-23, conv=stack). Source: https:\/\/huggingface.co\/LiquidAI\/LFM3-Audio-2B"
|
| 8 |
+
}
|