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"
Clarify standard MLX memory handling in validation evidence
Browse filesThe stock batch generator uses Apple's recommended GPU wired limit. No manual override or macOS memory setting was changed. Measured results, test script, runtime patch and weights are unchanged.
FULL_MAC_VALIDATION.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Both complete, existing Swift checkpoints passed native Metal text generation
|
| 4 |
and two cached follow-up requests on an AWS M4 Pro Mac with 48 GiB RAM.
|
| 5 |
All weight shards were verified against their recorded SHA-256 hashes before
|
| 6 |
-
loading. No quantization, tensor edits, context changes or memory-limit overrides
|
| 7 |
were performed. Hub offline mode was enabled during testing.
|
| 8 |
|
| 9 |
The input is our own synthetic repeated-record conversation, followed by a short
|
|
@@ -45,8 +45,12 @@ HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 python \
|
|
| 45 |
```
|
| 46 |
|
| 47 |
Output directories must be new. The harness uses the real server and complete
|
| 48 |
-
released weights, without building or quantizing any synthetic model. It
|
| 49 |
-
the server's
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
These results establish the tested text workload on the stated 48 GiB machine.
|
| 52 |
They do not establish 24 GiB operation, arbitrary 262k-token workloads, GUI/plugin
|
|
|
|
| 3 |
Both complete, existing Swift checkpoints passed native Metal text generation
|
| 4 |
and two cached follow-up requests on an AWS M4 Pro Mac with 48 GiB RAM.
|
| 5 |
All weight shards were verified against their recorded SHA-256 hashes before
|
| 6 |
+
loading. No quantization, tensor edits, context changes or manual memory-limit overrides
|
| 7 |
were performed. Hub offline mode was enabled during testing.
|
| 8 |
|
| 9 |
The input is our own synthetic repeated-record conversation, followed by a short
|
|
|
|
| 45 |
```
|
| 46 |
|
| 47 |
Output directories must be new. The harness uses the real server and complete
|
| 48 |
+
released weights, without building or quantizing any synthetic model. It suppresses
|
| 49 |
+
the server startup helper's wired-limit call. The unchanged stock BatchGenerator
|
| 50 |
+
still calls MLX's set_wired_limit with Apple's recommended working-set size;
|
| 51 |
+
macOS memory settings are not changed. The legacy result field
|
| 52 |
+
`memory_limit_overrides=false` denotes no manual override, not suppression of this
|
| 53 |
+
normal batch-generator behavior. The actual Metal device is recorded in the results.
|
| 54 |
|
| 55 |
These results establish the tested text workload on the stated 48 GiB machine.
|
| 56 |
They do not establish 24 GiB operation, arbitrary 262k-token workloads, GUI/plugin
|
UPLOAD_MANIFEST.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
| 8 |
},
|
| 9 |
{
|
| 10 |
"path": "FULL_MAC_VALIDATION.md",
|
| 11 |
-
"bytes":
|
| 12 |
-
"sha256": "
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"path": "LICENSE",
|
|
@@ -75,13 +75,13 @@
|
|
| 75 |
},
|
| 76 |
{
|
| 77 |
"path": "compatibility/cache-tests/full-mac-4bit-results.json",
|
| 78 |
-
"bytes":
|
| 79 |
-
"sha256": "
|
| 80 |
},
|
| 81 |
{
|
| 82 |
"path": "compatibility/cache-tests/full-mac-5bit-results.json",
|
| 83 |
-
"bytes":
|
| 84 |
-
"sha256": "
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"path": "compatibility/cache-tests/offline-4bit-results.json",
|
|
|
|
| 8 |
},
|
| 9 |
{
|
| 10 |
"path": "FULL_MAC_VALIDATION.md",
|
| 11 |
+
"bytes": 3562,
|
| 12 |
+
"sha256": "92cf16c5549a39fd8176028053bf57181eaf2c5fe31b142b36b961d0a5f6bf4a"
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"path": "LICENSE",
|
|
|
|
| 75 |
},
|
| 76 |
{
|
| 77 |
"path": "compatibility/cache-tests/full-mac-4bit-results.json",
|
| 78 |
+
"bytes": 3127,
|
| 79 |
+
"sha256": "57c1c0924fadfec93f70a0787e31af02c36e8c996e30529ebd318b3a680b9f6f"
|
| 80 |
},
|
| 81 |
{
|
| 82 |
"path": "compatibility/cache-tests/full-mac-5bit-results.json",
|
| 83 |
+
"bytes": 3123,
|
| 84 |
+
"sha256": "92f539012ef169ada9ab9970b077425664c80c7369f70c0faa58c927c6005951"
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"path": "compatibility/cache-tests/offline-4bit-results.json",
|
compatibility/cache-tests/full-mac-4bit-results.json
CHANGED
|
@@ -93,5 +93,12 @@
|
|
| 93 |
"retained_limit_observed_in_all_samples": true
|
| 94 |
},
|
| 95 |
"model_repository": "ukisai/Swift-1.5-4bit-MLX",
|
| 96 |
-
"tested_revision": "c4765c752caee282928f62685722e11000ec64cf"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
|
|
|
| 93 |
"retained_limit_observed_in_all_samples": true
|
| 94 |
},
|
| 95 |
"model_repository": "ukisai/Swift-1.5-4bit-MLX",
|
| 96 |
+
"tested_revision": "c4765c752caee282928f62685722e11000ec64cf",
|
| 97 |
+
"memory_limit_scope": {
|
| 98 |
+
"manual_overrides": false,
|
| 99 |
+
"macos_settings_changed": false,
|
| 100 |
+
"server_startup_wired_limit_helper": "suppressed by the HTTP harness",
|
| 101 |
+
"batch_generator_wired_limit": "unchanged stock MLX-LM behavior: uses Apple's recommended working-set size",
|
| 102 |
+
"legacy_boolean_meaning": "memory_limit_overrides=false records no manual override; it does not suppress stock batch-generator behavior"
|
| 103 |
+
}
|
| 104 |
}
|
compatibility/cache-tests/full-mac-5bit-results.json
CHANGED
|
@@ -93,5 +93,12 @@
|
|
| 93 |
"retained_limit_observed_in_all_samples": true
|
| 94 |
},
|
| 95 |
"model_repository": "ukisai/Swift-1.5-5bit-MLX",
|
| 96 |
-
"tested_revision": "5359607ded7c88e3c7379a0adfb879eaf483cd98"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
|
|
|
| 93 |
"retained_limit_observed_in_all_samples": true
|
| 94 |
},
|
| 95 |
"model_repository": "ukisai/Swift-1.5-5bit-MLX",
|
| 96 |
+
"tested_revision": "5359607ded7c88e3c7379a0adfb879eaf483cd98",
|
| 97 |
+
"memory_limit_scope": {
|
| 98 |
+
"manual_overrides": false,
|
| 99 |
+
"macos_settings_changed": false,
|
| 100 |
+
"server_startup_wired_limit_helper": "suppressed by the HTTP harness",
|
| 101 |
+
"batch_generator_wired_limit": "unchanged stock MLX-LM behavior: uses Apple's recommended working-set size",
|
| 102 |
+
"legacy_boolean_meaning": "memory_limit_overrides=false records no manual override; it does not suppress stock batch-generator behavior"
|
| 103 |
+
}
|
| 104 |
}
|