Thank you for your interest in contributing to mlxcel! This document covers the basics for getting started. For the deeper working contract — invariants for the request path, MLX upstream pin synchronization, model-porting checklist — read AGENTS.md after this.
| You want to... | Read |
|---|---|
| Report a security vulnerability | SECURITY.md — do not open a public issue |
| File a bug or feature request | GitHub Issues (use the templates) |
| Build and test locally | docs/installation.md |
| Understand the architecture | docs/architecture.md |
| Add a new model family | docs/adding-models.md |
| Understand the project conventions | AGENTS.md |
- Search existing issues first.
- Use the bug-report or feature-request template — they prompt for the information we need to act on the issue.
- Include the mlxcel version (
mlxcel --version), platform (macOS Apple Silicon / Linux CUDA + GPU model), and the checkpoint you were running. - For inference correctness or performance reports, also include the prompt and seed so the run is reproducible.
- Fork the repository and create a feature branch off
main:git checkout -b feat/short-description
- Make your changes. Keep one PR scoped to one logical change — a model port, an MLX bump, and a CLI rename are three PRs.
- Build and test for your target:
# macOS (Apple Silicon) cargo build --release --features metal,accelerate cargo test --release # Linux / CUDA cargo build --release --features cuda cargo test --release
- Run the local quality gates:
cargo fmt --all -- --check # enforced by CI; fmt violations block merge cargo clippy --all-targets -- -D warnings cargo deny check # advisories + licenses + sources
- For inference changes, validate against a real checkpoint — synthetic or build-only validation is not enough (see
AGENTS.mdfor why). - Commit with a conventional prefix (see below) and a clear message.
- Push to your fork and open a Pull Request. The PR template will prompt for a summary, test plan, and linked issues.
Write commits, PR titles, and issue comments in English. Use Conventional Commits prefixes:
| Prefix | When |
|---|---|
feat: |
New user-visible feature |
fix: |
Bug fix |
perf: |
Performance improvement with measurable evidence |
refactor: |
Internal restructuring without behavior change |
chore: |
Build, CI, dependencies, release infrastructure |
docs: |
Documentation |
test: |
Tests only |
- Follow standard Rust conventions:
rustfmt,clippy -D warnings, idiomatic ownership and error handling. - Tests live next to the code (
_tests.rsfiles) for unit tests, and undertests/for end-to-end integration. - When modifying a function shared by multiple models, update the
// Used by: Model1, Model2, …comment above it. Seedocs/code-guidelines.md. - Do not introduce Python on the inference request path. Python is acceptable only for benchmarks and out-of-band tooling.
See docs/adding-models.md for the full checklist. The short version: land one working checkpoint plus tests before broadening, mirror the mlx-lm / mlx-vlm directory shape where it helps, and update docs/supported-models.md plus the detection table in src/models/detection.rs.
The pinned MLX C++ commit lives in three files that must stay in sync — see the "MLX upstream commit upgrade" section of AGENTS.md for the list and the mandatory post-bump validation.
Detailed setup instructions are in docs/installation.md.
Minimum:
- Rust 1.93+ (project uses edition 2024)
- macOS: Apple Silicon Mac on macOS Sonoma+; Xcode Command Line Tools
- Linux: CUDA 13+ toolchain, OpenBLAS, LAPACK (see
docs/installation.mdfor the package list)
Recommended local tooling:
cargo install cargo-deny --locked
cargo install cargo-audit --lockedThis project follows the Contributor Covenant Code of Conduct. By participating, you agree to abide by its terms.
- General questions, design discussion: open a GitHub Discussion (when enabled) or a
questionissue. - Security: see
SECURITY.md.
By contributing to mlxcel, you agree that your contributions will be licensed under the Apache License 2.0.