Instructions to use LiquidAI/LFM3-Audio-2B-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use LiquidAI/LFM3-Audio-2B-MLX-8bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download LiquidAI/LFM3-Audio-2B-MLX-8bit --local-dir LFM3-Audio-2B-MLX-8bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
LFM3-Audio-2B-MLX-8bit
8-bit MLX version of LFM3-Audio-2B for Apple Silicon. The weights take 2.33 GB, plus 0.15 GB for the audio codec in audio_tokenizer/.
The language backbone uses 8-bit affine quantization with groups of 64. The audio encoder, audio projector, depth decoder and codebook embedding stay in BF16. The audio codec is the original one. 8-bit is the recommended trade-off between size and accuracy.
Find architecture and usage details in the original model card.
Use with MLX-VLM
Support for LFM3-Audio in MLX-VLM is in progress. We will update this card when an MLX-VLM release supports it.
# Speech recognition
python -m mlx_vlm.generate --model LiquidAI/LFM3-Audio-2B-MLX-8bit \
--system "Perform ASR in English." --prompt "" --audio <AUDIO PATH> \
--temperature 0 --max-tokens 2048
# Text to speech
python -m mlx_vlm.generate --model LiquidAI/LFM3-Audio-2B-MLX-8bit \
--system "Perform TTS in American English using a female voice." \
--prompt "Hello there!" --output-modality audio --output tts.wav
# Speech-to-speech chat
python -m mlx_vlm.generate --model LiquidAI/LFM3-Audio-2B-MLX-8bit \
--system "Respond with interleaved text and audio." --prompt "" \
--audio <AUDIO PATH> --output-modality audio --max-tokens 1024 --output answer.wav
Speech output samples with audio_temperature=1.0, audio_top_k=128 and audio_repetition_penalty=1.1, the defaults in generation_config.json. The original model card lists the voices, languages and other system prompts. More options in the MLX guide.
- Downloads last month
- -
8-bit
Model tree for LiquidAI/LFM3-Audio-2B-MLX-8bit
Base model
LiquidAI/LFM3-Audio-2B