Instructions to use nnopt-dev/YOLO11n-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nnopt-dev/YOLO11n-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download nnopt-dev/YOLO11n-MLX --local-dir YOLO11n-MLX
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download m2pro-gpu-fp16/src/spin.c from nnopt-dev/YOLO11n-MLX: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/nnopt-dev/YOLO11n-MLX/resolve/main/m2pro-gpu-fp16/src/spin.c
- Command line
-
hf download hf://nnopt-dev/YOLO11n-MLX/m2pro-gpu-fp16/src/spin.c
-
curl -L -o spin.c https://huggingface.co/nnopt-dev/YOLO11n-MLX/resolve/main/m2pro-gpu-fp16/src/spin.c
555 Bytes
| // Keep-awake helper for run.py: a user-interactive thread that spins (GIL released, called through ctypes) while | |
| // requests are being served. Without it macOS lowers the CPU cluster clock while the encode thread waits on the | |
| // GPU; MLX then encodes slower, the GPU starves and also clocks down, and per-request latency drifts 5 -> 15 ms. | |
| void spin_while(volatile int *flag) { | |
| pthread_set_qos_class_self_np(QOS_CLASS_USER_INTERACTIVE, 0); | |
| while (*flag) { | |
| __asm__ volatile("yield"); | |
| } | |
| } | |