Instructions to use LoyalAI/Underdog-Bark-3.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LoyalAI/Underdog-Bark-3.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="LoyalAI/Underdog-Bark-3.0")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LoyalAI/Underdog-Bark-3.0", device_map="auto") - MLX
How to use LoyalAI/Underdog-Bark-3.0 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download LoyalAI/Underdog-Bark-3.0 --local-dir Underdog-Bark-3.0
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
bark_coreml.py recompiles the .mlpackage on every run (5-6 minutes each time)
coreml/ane/bark_coreml.py loads BarkEncoder.mlpackage with ct.models.MLModel(...). coremltools compiles the package to a temporary .mlmodelc on every load and discards it afterwards, so every new process pays the compile again. That took 5 to 6 minutes per run on an M4 Pro Mac.
Compiling once with xcrun coremlcompiler compile BarkEncoder.mlpackage . (77 s for the Pro package) and loading the result through ct.models.CompiledMLModel brings later loads down to about 3 seconds. The script could cache the compiled model next to the package, using MLModel.get_compiled_model_path() and then CompiledMLModel on later runs, or the repo could ship the compiled .mlmodelc. Keeping one Transcriber alive, as the card suggests, only helps within a single process.