AFM accepts local paths and Hugging Face model IDs. Curated model lookup and Hugging Face downloads are separate concerns, so use the variable that matches the layout you actually manage.
Recommended setup
mkdir -p ~/.cache/afm-models ~/.cache/huggingface/hub
export MACAFM_MLX_MODEL_CACHE=~/.cache/afm-models
export HF_HUB_CACHE=~/.cache/huggingface/hubMACAFM_MLX_MODEL_CACHE is a read-only lookup root for side-loaded checkpoints; AFM checks flat organization paths, a models/ subtree, and Hugging Face-style cache names below it. It does not redirect downloads. HF_HUB_CACHE identifies the standard Hub cache used for downloaded snapshots.
Lookup order
MACAFM_MLX_MODEL_CACHE: flat,models/, and Hugging Face-style layouts.- Swift Hub default:
~/Documents/huggingface/models/…. HUGGINGFACE_HUB_CACHEorHF_HUB_CACHE.HF_HOME.XDG_CACHE_HOME.- Python Hugging Face default:
~/.cache/huggingface/hub. - Legacy locations below
~/Library/Caches.
A candidate is valid when it contains config.json and one or more .safetensors files. For Hugging Face cache layouts, AFM enters the resolved directory below snapshots/.
Model IDs and paths
An unqualified ID such as Qwen3-0.6B-4bit defaults to mlx-community/Qwen3-0.6B-4bit. Pass an organization-qualified ID when the model lives elsewhere, or pass an existing local directory when you need an exact checkpoint.
Capacity planning
Checkpoint size is only part of memory demand. Runtime weights, KV state, context length, concurrent slots, vision media, and speculative drafter artifacts all consume unified memory. Start with a small 0.6B–4B quantized model to verify installation before moving to 30B-class checkpoints.