lmxlab
Transformer language models on Apple Silicon, built with MLX.
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lmxlab-0.4.0.tar.gz | 379.1 kB | With provenance | Details for lmxlab-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lmxlab-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for lmxlab-0.4.0-py3-none-any.whl |
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 logRelease 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 logSecurity for lmxlab 0.4.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lmxlab-0.4.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.