Skip to main content

lmxlab

Transformer language models on Apple Silicon, built with MLX.

CI Docs PyPI Python License

Install

pip install lmxlab

Requires Python 3.12+ and Apple Silicon (M1+). MLX runs on Intel/Linux too, but CPU-only.

Usage

import mlx.core as mx
from lmxlab.models.llama import llama_config
from lmxlab.models.base import LanguageModel

config = llama_config(vocab_size=32000, d_model=512, n_heads=8, n_kv_heads=4, n_layers=6)
model = LanguageModel(config)
mx.eval(model.parameters())

tokens = mx.array([[1, 234, 567]])
logits, caches = model(tokens)

Architecture variants (GPT, LLaMA, DeepSeek, Gemma, Qwen, Mixtral, etc.) are config factories — same LanguageModel class, different settings.

CLI

lmxlab list                    # Show available architectures
lmxlab info llama --tiny       # Config details
lmxlab count deepseek --detail # Parameter breakdown

Docs

Full API docs at michaelellis003.github.io/lmxlab.

Development

git clone https://github.com/michaelellis003/lmxlab.git
cd lmxlab
uv sync --extra dev
uv run pre-commit install
uv run pytest

License

MIT

Metadata

Release files for lmxlab 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lmxlab 0.4.0
File Size Uploaded
lmxlab-0.4.0.tar.gz 379.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lmxlab 0.4.0
File Interpreter ABI Platform
lmxlab-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 494.5 kB

Release files / lmxlab-0.4.0.tar.gz

Download URL lmxlab-0.4.0.tar.gz
Size 379.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e7bc09fa6f6d80866ec8ec862f01999e6a2fd15109111ef04851734549ec50b2
BLAKE2b-256 checksum
How to use checksums
9f49ce8a7bec108a541c616049efb89c413df4041601bddf205ee03199d727b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release files / lmxlab-0.4.0-py3-none-any.whl

Download URL lmxlab-0.4.0-py3-none-any.whl
Size 115.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46693ba5061ca2b0046f8c8ff2f4335374e87b9cc1f846c132c896c2320c2657
BLAKE2b-256 checksum
How to use checksums
338143c84be2815bd54fa8d2f772238ec04b6fc8b964fa2b13a94f4695476b1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page