Instructions to use Xylolabs/Qwen3.5-2B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Xylolabs/Qwen3.5-2B-MLX-4bit 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("Xylolabs/Qwen3.5-2B-MLX-4bit") 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 Xylolabs/Qwen3.5-2B-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Xylolabs/Qwen3.5-2B-MLX-4bit"
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": "Xylolabs/Qwen3.5-2B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Xylolabs/Qwen3.5-2B-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Xylolabs/Qwen3.5-2B-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Xylolabs/Qwen3.5-2B-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xylolabs/Qwen3.5-2B-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Xylolabs/Qwen3.5-2B-MLX-4bit 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 "Xylolabs/Qwen3.5-2B-MLX-4bit"
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 Xylolabs/Qwen3.5-2B-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Xylolabs/Qwen3.5-2B-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Xylolabs/Qwen3.5-2B-MLX-4bit"
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 "Xylolabs/Qwen3.5-2B-MLX-4bit" \ --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 MANIFEST from Xylolabs/Qwen3.5-2B-MLX-4bit: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/Xylolabs/Qwen3.5-2B-MLX-4bit/resolve/main/MANIFEST
- Command line
-
hf download hf://Xylolabs/Qwen3.5-2B-MLX-4bit/MANIFEST
-
curl -L -o MANIFEST https://huggingface.co/Xylolabs/Qwen3.5-2B-MLX-4bit/resolve/main/MANIFEST
1.16 kB
| bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE | |
| 58144b6b500b33aa17ecb894766d4e3ced366d99a022b04e31cd4760f6a8c507 NOTICE | |
| 8f5f2999397d27afa725b9109cf9e2d11f993a4d761b363871cffd7a268a49e6 README.md | |
| 76c04f3c7208281da0aa16c0efad2bf0d5586c29e6b9fe2e8f8de2c1278cb255 accuracy-by-size.csv | |
| 3404465b5bba4e67a5b46b7d278f858cfdf2d78205c326e0c99de6c32aa915f0 accuracy-kl-dark.png | |
| 53d22d59645e37f9e66778713a236d5aee8305a06b639fc7f68c7ac735d4171d accuracy-kl.png | |
| 2c47eb318abf4d9a9713b80976e479ec1fd3732a4a6211a825fce85ea2cb5d29 accuracy-top1-dark.png | |
| 0070d9144cc4868f6cd0b89b8efc4282540de21675644f35a063af2bf0d32eb0 accuracy-top1.png | |
| 273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80 chat_template.jinja | |
| e045b40b025bb5ed397bce572cd303be22d042838714caacb7fb37e1a20e5269 config.json | |
| 4737e26bb3f6e26cd72cf1edd776827541a0342a0ec2522dcad234b51f7e77f0 model.safetensors | |
| e05d1c298c5b9b874506247a9467021e13425b9f7bf92b6b2b28ebdb5e10ced1 model.safetensors.index.json | |
| a5cd9732badce41de57e6efce8302930ded1c1188c5f81feb2bd6c24c4a1941f tokenizer.json | |
| 86f01837a638275f2d3479804e79802aaff0e3ccef15e5f29dd6afbe6551daed tokenizer_config.json | |