Conversion and optimization toolkit

Convert and optimize your model for Apple devices.

Convert and optimize your model for iPhone, iPad and Mac.

One command to get your model
running on 2 billion Apple devices.

>
For popular architectures

Convert in one command.

If your model is based on a popular architecture, including your own fine-tunes and adaptations, it converts in one command.

> uv run lalamo convert 'Qwen/Qwen3-0.6B'
🚀 Converting Qwen3-0.6B by Qwen.
⚙️ Using weight layout auto.
🧑‍🍳🔍 Model successfully cooked and saved to `models/Qwen3-0.6B`!
>
For custom architectures

Add new architectures easily.

If your model uses standard blocks, adding support is just a new config. If it uses custom layers, we build the converter for you.

def to_decoder_config(
self,
context_length: int | None,
activation_precision: DTypeLike,
accumulation_precision: DTypeLike,
metadata_dict: Mapping[str, str], # noqa: ARG002
) -> DecoderConfig:
if self.tie_word_embeddings:
embedding_config = TiedEmbeddingConfig(
input_scale=None,
logit_soft_cap=None,
precision=activation_precision,
)
else:
embedding_config = UntiedEmbeddingConfig(
input_scale=None,
logit_soft_cap=None,
precision=activation_precision,
)
rope_config = UnscaledRoPEConfig(
precision=activation_precision,
base=self.rope_theta,
max_sequence_length=context_length or self.max_position_embeddings,
)

Mirai can support your custom / non‑standard layers.

We will build full conversion pipeline specifically for your model. You will have the same correctness validation and quality measurement as standard models.

Our optimization pipeline prepares your model for peak performance on Apple devices.

Draft model training for speculative decoding.

We train a lightweight draft model matched to yours. The draft predicts tokens ahead, your model verifies in one pass. Up to 2x faster generation.

Quantization with
minimal quality loss.

We use state of the art quantization methods to achieve the best quality at the given size. You see the exact tradeoff between size, speed, and accuracy.

Output correctness and
quality validation.

Layer-by-layer comparison against reference outputs. We measure how optimization affects your model's output quality. Any deviation is flagged.

Optimize your model for 2 billion Apple devices.
Perfect for:

Model companies.

You train and ship models. Mirai optimizes them for Apple Silicon, benchmarks on real hardware, and distributes.

AI researchers & labs.

Mirai converts your model and puts it in front of real users on Apple devices, not just leaderboards.

Independent makers.

You're fine-tuning or training from scratch. Mirai gives your model the same device reach as OpenAI and DeepSeek.

Common questions:

terminal — mirai