Text Generation
MLX
Safetensors
English
qwen2
mlx-lm
8-bit precision
web-agent
web-search
conversational
Instructions to use eunjay/WebSailor-3B-MLX-8bit-community with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use eunjay/WebSailor-3B-MLX-8bit-community 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("eunjay/WebSailor-3B-MLX-8bit-community") 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 eunjay/WebSailor-3B-MLX-8bit-community with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "eunjay/WebSailor-3B-MLX-8bit-community"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "eunjay/WebSailor-3B-MLX-8bit-community" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use eunjay/WebSailor-3B-MLX-8bit-community 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 "eunjay/WebSailor-3B-MLX-8bit-community"
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 eunjay/WebSailor-3B-MLX-8bit-community
Run Hermes
hermes
- OpenClaw new
How to use eunjay/WebSailor-3B-MLX-8bit-community with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "eunjay/WebSailor-3B-MLX-8bit-community"
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 "eunjay/WebSailor-3B-MLX-8bit-community" \ --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"
- MLX LM
How to use eunjay/WebSailor-3B-MLX-8bit-community with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "eunjay/WebSailor-3B-MLX-8bit-community"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "eunjay/WebSailor-3B-MLX-8bit-community" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eunjay/WebSailor-3B-MLX-8bit-community", "messages": [ {"role": "user", "content": "Hello"} ] }'
| license: apache-2.0 | |
| language: en | |
| library_name: mlx | |
| base_model: Alibaba-NLP/WebSailor-3B | |
| base_model_revision: b317a15261674d83d851f0a14761840583bb9dce | |
| tags: | |
| - mlx | |
| - mlx-lm | |
| - 8-bit | |
| - web-agent | |
| - web-search | |
| pipeline_tag: text-generation | |
| # WebSailor-3B-MLX-8bit-community | |
| Unofficial community MLX conversion of [Alibaba-NLP/WebSailor-3B](https://huggingface.co/Alibaba-NLP/WebSailor-3B) for Apple Silicon. | |
| This repository is not an official Alibaba-NLP or Hugging Face release and does not imply endorsement by the original authors. | |
| ## Conversion details | |
| - Source model: `Alibaba-NLP/WebSailor-3B` | |
| - Source revision: [`b317a15261674d83d851f0a14761840583bb9dce`](https://huggingface.co/Alibaba-NLP/WebSailor-3B/commit/b317a15261674d83d851f0a14761840583bb9dce) | |
| - Output format: MLX Safetensors | |
| - Quantization: 8-bit affine, group size 64 | |
| - Effective quantization reported by `mlx-lm`: 8.501 bits/weight | |
| - Conversion tool: `mlx-lm 0.31.2` with `mlx 0.31.1` | |
| - Original license: Apache-2.0; see [`LICENSE`](./LICENSE) | |
| Install MLX-LM with: | |
| ```bash | |
| pip install -U mlx-lm | |
| ``` | |
| The conversion command was: | |
| ```bash | |
| HF_HUB_DISABLE_XET=1 mlx_lm.convert \ | |
| --hf-path Alibaba-NLP/WebSailor-3B \ | |
| --mlx-path ./WebSailor-3B-MLX-8bit \ | |
| --quantize \ | |
| --q-bits 8 \ | |
| --q-group-size 64 | |
| ``` | |
| ## Local usage | |
| MLX-LM can resolve the Hugging Face repository ID directly: | |
| ```bash | |
| pip install -U mlx-lm | |
| mlx_lm.generate \ | |
| --model eunjay/WebSailor-3B-MLX-8bit-community \ | |
| --prompt "Reply with one short sentence." \ | |
| --max-tokens 64 | |
| ``` | |
| For a local checkout, replace the repository ID with `./WebSailor-3B-MLX-8bit`. | |
| The model weights alone do not browse the web; web-search or browser tool calls require an external tool/backend and an agent loop. | |
| ## Tool calling and web-search scope | |
| The original WebSailor-3B agent harness uses both `search` and `visit` tools through WebAgent. This MLX conversion was validated only with a one-shot `search` tool-call smoke test; the full WebSailor/WebAgent `search` + `visit` harness was not run against this conversion. | |
| For the smoke test, an explicit JSON-format instruction was supplied so the model emitted a parser-compatible call: | |
| ```text | |
| If you need the search tool, output exactly one valid JSON object between <tool_call> and </tool_call>. Use double-quoted keys and this shape: {"name":"search","arguments":{"query":["query text"]}}. Never output YAML labels such as name: or arguments:. | |
| ``` | |
| The local OpenAI-compatible MLX server parsed that single call successfully. The search service itself remains external and must execute the requested query. This result is not validation of the complete WebSailor search agent or its `visit` flow. | |
| ## Compatibility note | |
| Hugging Face may display Pi, Hermes, or OpenClaw connection examples automatically for compatible serving endpoints. Those examples indicate endpoint connectivity, not validation of WebSailor's search-agent behavior. Tool-call markers and parsers can vary across MLX-LM versions, so treat the result above as a **one-shot smoke test** and verify the full agent harness before production use. | |
| ## Attribution | |
| Please retain the original model attribution and Apache-2.0 license when redistributing this conversion. This repository contains converted weights and supporting tokenizer/configuration files; it is not a replacement for the [original model card](https://huggingface.co/Alibaba-NLP/WebSailor-3B) or project code. | |