# MTPLX License Information: Apache 2.0 Terms for the Multi-Token Prediction Runtime

> Understand the MTPLX license. Explore the Apache 2.0 terms for the Multi-Token Prediction Runtime, allowing commercial use, modification, and distribution. Get key license details now.

- Repository: [Youssof Altoukhi/MTPLX](https://github.com/youssofal/MTPLX)
- Tags: licensing-information
- Published: 2026-09-11

---

**MTPLX is released under the Apache License 2.0, a permissive open-source license that allows commercial use, modification, and distribution, as defined in the `LICENSE` file at the root of the youssofal/MTPLX repository.**

The youssofal/MTPLX project provides a native macOS application and CLI for running fast local LLMs with multi-token prediction (MTP) on Apple Silicon. Understanding the MTPLX license information is critical for developers integrating the runtime into commercial products or modifying core components like `MTPLXRuntime` and the dynamic model loader.

## Apache 2.0 License Structure

The entire MTPLX codebase—including the runtime abstraction layer, backend registry, and MTP patch modules—is governed by the Apache License 2.0. This license is located in the repository's **`LICENSE`** file and applies to all Python modules, including:

- **[`mtplx/runtime.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/runtime.py)** – Contains the `MTPLXRuntime` class and `load()` function
- **[`mtplx/__init__.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/__init__.py)** – Handles lazy loading and public API exposure  
- **[`mtplx/backends/registry.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/backends/registry.py)** – Manages architecture-to-module mappings
- **[`mtplx/mtp_patch.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/mtp_patch.py)** and model-specific patches (e.g., [`qwen3_5_mtp_patch.py`](https://github.com/youssofal/MTPLX/blob/main/qwen3_5_mtp_patch.py), [`step3p5_mtp_patch.py`](https://github.com/youssofal/MTPLX/blob/main/step3p5_mtp_patch.py))

Under Apache 2.0, users obtain a worldwide, royalty-free, non-exclusive patent license to use, reproduce, and prepare derivative works from these files.

## Permitted Uses of MTPLX Components

The license grants broad rights to utilize all documented components without restriction on private or commercial deployment. This includes the **runtime abstraction** layer where `MTPLXRuntime` encapsulates model state:

```python
from mtplx import load

# Licensed under Apache 2.0 - commercial use permitted

runtime = load(
    model_path,
    mtp=True,
    proj_quant="4bit"
)
logits = runtime.forward_ar(input_ids)

```

Similarly, the **backend registry** in [`mtplx/backends/registry.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/backends/registry.py)—which discovers MLX-LM architectures via `ARCHITECTURE_DECLARED_MODULES`—can be modified or redistributed provided attribution requirements are met.

## Modifying Core Runtime Files

Apache 2.0 explicitly permits modification of source files. Developers may fork the `MTPLXRuntime` class in [`mtplx/runtime.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/runtime.py) to override methods like `forward_ar()`, `draft_mtp()`, or `make_cache()` for proprietary applications without imposing copyleft obligations on their entire codebase.

For example, customizing the compiled AR forward path in **[`mtplx/compiled_forward.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/compiled_forward.py)** or implementing a specialized cache strategy in **[`mtplx/cache_state.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/cache_state.py)** remains compliant as long as the license terms are followed.

## Attribution and Compliance Requirements

To comply with the MTPLX license information, redistributions of the software—whether modified or unmodified—must include:

- A copy of the Apache 2.0 license text
- A `NOTICE` file (if provided in the original)
- Preservation of copyright headers in files like [`mtplx/__init__.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/__init__.py) and [`mtplx/runtime.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/runtime.py)
- Documentation of significant changes made to files such as [`mtplx/backends/registry.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/backends/registry.py)

The CLI entry points in [`mtplx/__main__.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/__main__.py) and the OpenAI-compatible server in [`mtplx/server/openai.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/server/openai.py) fall under identical terms, requiring no special licensing beyond standard Apache 2.0 attribution when distributed.

## Summary

- MTPLX is licensed under **Apache License 2.0**, located in the repository root
- All source files—including [`mtplx/runtime.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/runtime.py), [`mtplx/backends/registry.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/backends/registry.py), and MTP patches—are covered under this license
- **Commercial use is permitted** without royalty or source disclosure requirements
- **Modification is allowed** for private or public use, including changes to `MTPLXRuntime` and model loaders
- **Attribution is required** through retention of copyright notices and license text

## Frequently Asked Questions

### Is MTPLX free for commercial use?

Yes. The Apache 2.0 license permits commercial use, distribution, and modification without charging fees or imposing revenue-sharing requirements. You may use `MTPLXRuntime` and the model loading infrastructure in proprietary applications, provided you include the required attribution and license text.

### Can I modify the MTPLXRuntime class for my proprietary application?

Yes. You may modify `MTPLXRuntime` in [`mtplx/runtime.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/runtime.py) or create derivative works based on the runtime abstraction without open-sourcing your entire application. However, you must document any significant changes to the files and include a copy of the Apache 2.0 license with your distribution.

### Where can I find the full MTPLX license text?

The complete license terms are available in the **`LICENSE`** file at the root of the youssofal/MTPLX repository. This file contains the standard Apache License, Version 2.0 text that governs all components including the CLI ([`mtplx/__main__.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/__main__.py)), server ([`mtplx/server/openai.py`](https://github.com/youssofal/MTPLX/blob/main/mtplx/server/openai.py)), and patch modules.

### Do I need to contribute my modifications back to the MTPLX project?

No. Apache 2.0 does not impose a copyleft requirement. You are not obligated to contribute patches, improvements to `_compiled_ar_forward`, or custom MTP adapters back to the upstream repository, though community contributions are encouraged under the same license terms.