Feature Flags
PMetal uses Cargo feature flags to control which crates and capabilities are compiled.
Feature Matrix
Section titled “Feature Matrix”| Feature | Default | Crate | Description |
|---|---|---|---|
core | Yes | pmetal-core | Foundation types, configs, traits |
gguf | Yes | pmetal-gguf | GGUF format support |
metal | Yes | pmetal-metal | Metal GPU kernels |
hub | Yes | pmetal-hub | HuggingFace Hub integration |
distributed | Yes | pmetal-distributed | Multi-Mac discovery, all-reduce, pipeline harnesses |
cli | Yes | pmetal | Command-line binary and shared CLI dependencies |
dashboard | Yes | — | Ratatui terminal TUI |
trainer | Yes | pmetal-trainer | SFT, LoRA/QLoRA, pretraining, GRPO, RLKD, distillation orchestration |
lora | Yes | pmetal-lora | LoRA/QLoRA adapters |
merge | Yes | pmetal-merge | Model merging strategies and save pipeline |
ane | Yes | pmetal-metal, pmetal-trainer, pmetal-models | Apple Neural Engine integration |
mlx | Yes | pmetal-mlx | MLX backend |
models | Yes | pmetal-models | LLM architectures |
data | Yes | pmetal-data | Dataset loading, tokenization, chat templates |
distill | Yes* | pmetal-distill | Knowledge distillation (*via trainer) |
lora-metal-fused | No | — | ~2× LoRA training speedup via fused Metal kernels |
native-only | No | pmetal-bridge | Bridge-only native runtime without the full MLX feature set |
vocoder | No | pmetal-vocoder | BigVGAN neural vocoder |
mhc | No | pmetal-mhc | Manifold-Constrained Hyper-Connections |
serve | No | pmetal-serve | OpenAI-compatible inference server |
mcp | No | pmetal-mcp | MCP server tools |
full | No | — | All library feature groups; add serve/mcp separately for those CLI surfaces |
# Default featurescargo install pmetal
# With specific featurescargo install pmetal --features "serve,mcp"
# All library feature groupscargo install pmetal --features full
# Library feature groups plus optional CLI surfacescargo install pmetal --features "full,serve,mcp"
# Minimal CLI buildcargo build --release --no-default-features --features cli
# TUI without default trainer/ANE/distributed stackcargo build --release --no-default-features --features dashboardAs a Library Dependency
Section titled “As a Library Dependency”[dependencies]pmetal = { version = "0.5", default-features = false, features = ["core", "models"] }
# Or specific cratespmetal-models = "0.5"pmetal-trainer = "0.5"pmetal-lora = "0.5"See Also
Section titled “See Also”- Installation — Build options
- Advanced SDK Usage — Crate-level API