Instructions to use ukisai/Swift-1.5-5bit-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ukisai/Swift-1.5-5bit-MLX with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ukisai/Swift-1.5-5bit-MLX") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use ukisai/Swift-1.5-5bit-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ukisai/Swift-1.5-5bit-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use ukisai/Swift-1.5-5bit-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ukisai/Swift-1.5-5bit-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ukisai/Swift-1.5-5bit-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use ukisai/Swift-1.5-5bit-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ukisai/Swift-1.5-5bit-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ukisai/Swift-1.5-5bit-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukisai/Swift-1.5-5bit-MLX"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ukisai/Swift-1.5-5bit-MLX" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download compatibility/cache-tests/full-mac-5bit-results.json from ukisai/Swift-1.5-5bit-MLX: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/resolve/main/compatibility/cache-tests/full-mac-5bit-results.json
- Command line
-
hf download hf://ukisai/Swift-1.5-5bit-MLX/compatibility/cache-tests/full-mac-5bit-results.json
-
curl -L -o full-mac-5bit-results.json https://huggingface.co/ukisai/Swift-1.5-5bit-MLX/resolve/main/compatibility/cache-tests/full-mac-5bit-results.json
3.12 kB
| { | |
| "status": "PASS_FULL_MODEL_SYNTHETIC_LONG_CONTEXT_FOLLOWUPS", | |
| "physical_memory_bytes": 51539607552, | |
| "offline": true, | |
| "model_weights_changed": false, | |
| "memory_limit_overrides": false, | |
| "device": "Device(gpu, 0)", | |
| "device_info": { | |
| "device_name": "Apple M4 Pro", | |
| "max_recommended_working_set_size": 40200896512, | |
| "memory_size": 51539607552, | |
| "architecture": "applegpu_g16s", | |
| "max_buffer_length": 30150672384, | |
| "resource_limit": 499000 | |
| }, | |
| "packages": { | |
| "mlx": "0.32.2", | |
| "mlx-lm": "0.32.0", | |
| "transformers": "5.14.1", | |
| "huggingface_hub": "1.31.0" | |
| }, | |
| "prompt_origin": "Synthetic repeated records; no third-party conversation", | |
| "initial_prompt_tokens": 86004, | |
| "requests": [ | |
| { | |
| "turn": 1, | |
| "elapsed_seconds": 906.998991333, | |
| "usage": { | |
| "prompt_tokens": 86004, | |
| "completion_tokens": 2, | |
| "total_tokens": 86006, | |
| "prompt_tokens_details": { | |
| "cached_tokens": 0 | |
| } | |
| }, | |
| "generation": "READY", | |
| "finish_reason": "stop", | |
| "retained_bytes": 5945229312, | |
| "retained_limit": 7946990032, | |
| "retained_sequences": 2, | |
| "peak_mlx_bytes": 36879525149 | |
| }, | |
| { | |
| "turn": 2, | |
| "elapsed_seconds": 1.4516940830003477, | |
| "usage": { | |
| "prompt_tokens": 86024, | |
| "completion_tokens": 2, | |
| "total_tokens": 86026, | |
| "prompt_tokens_details": { | |
| "cached_tokens": 86000 | |
| } | |
| }, | |
| "generation": "READY", | |
| "finish_reason": "stop", | |
| "retained_bytes": 5946540032, | |
| "retained_limit": 7946990032, | |
| "retained_sequences": 2, | |
| "peak_mlx_bytes": 37340425976 | |
| }, | |
| { | |
| "turn": 3, | |
| "elapsed_seconds": 1.4471444169998904, | |
| "usage": { | |
| "prompt_tokens": 86044, | |
| "completion_tokens": 2, | |
| "total_tokens": 86046, | |
| "prompt_tokens_details": { | |
| "cached_tokens": 86020 | |
| } | |
| }, | |
| "generation": "READY", | |
| "finish_reason": "stop", | |
| "retained_bytes": 5947850752, | |
| "retained_limit": 7946990032, | |
| "retained_sequences": 2, | |
| "peak_mlx_bytes": 37358006008 | |
| } | |
| ], | |
| "warm_reuse_observed": true, | |
| "warm_reuse_fraction": [ | |
| 0.9997210080907654, | |
| 0.9997210729394264 | |
| ], | |
| "monitor_summary": { | |
| "samples": 91, | |
| "peak_active_mlx_bytes": 28351155232, | |
| "peak_allocator_cache_bytes": 5353876378, | |
| "swap_observations": [ | |
| "total = 0.00M used = 0.00M free = 0.00M (encrypted)" | |
| ], | |
| "worker_healthy_in_all_samples": true, | |
| "retained_limit_observed_in_all_samples": true | |
| }, | |
| "model_repository": "ukisai/Swift-1.5-5bit-MLX", | |
| "tested_revision": "5359607ded7c88e3c7379a0adfb879eaf483cd98", | |
| "memory_limit_scope": { | |
| "manual_overrides": false, | |
| "macos_settings_changed": false, | |
| "server_startup_wired_limit_helper": "suppressed by the HTTP harness", | |
| "batch_generator_wired_limit": "unchanged stock MLX-LM behavior: uses Apple's recommended working-set size", | |
| "legacy_boolean_meaning": "memory_limit_overrides=false records no manual override; it does not suppress stock batch-generator behavior" | |
| } | |
| } | |