Instructions to use Aayush9029/petal-w1-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Aayush9029/petal-w1-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("Aayush9029/petal-w1-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 Aayush9029/petal-w1-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 "Aayush9029/petal-w1-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": "Aayush9029/petal-w1-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Aayush9029/petal-w1-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 "Aayush9029/petal-w1-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Aayush9029/petal-w1-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aayush9029/petal-w1-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Aayush9029/petal-w1-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 "Aayush9029/petal-w1-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 Aayush9029/petal-w1-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Aayush9029/petal-w1-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 "Aayush9029/petal-w1-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 "Aayush9029/petal-w1-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"
petal-w1-4bit
This is the MLX 4-bit build of petal-w1, and the build that Petal downloads.
petal-w1 turns raw dictation into the message you meant to write. It is the on-device cleanup model in Petal, a free macOS dictation app. It runs with MLX on Apple silicon.
Dictation is thinking out loud. petal-w1 writes the short version:
- Condenses rambles to the points that matter. A long ramble often becomes a quarter to a half of its length.
- States each point once when the speaker repeats it, and keeps every fact, name, number, file name, and doubt.
- Applies self-corrections ("Friday, no wait, Thursday" becomes "Thursday").
- Formats lists as bullets and emails as emails.
- Keeps the speaker's first person, tone, slang, and profanity as said. "IDGAF" stays "IDGAF".
- Keeps questions as questions and requests as requests. It never answers the text.
v1.4 is a full fine-tune of Qwen3.5-2B. Earlier versions used Qwen3.5-0.8B.
Results
Claude Sonnet graded each output against its input. An output is error-free when it drops no point, changes no meaning, and does not answer the text. Length is output words divided by input words, median, for inputs of 80 words or more.
| Held-out set | v1.4 8-bit | v1.4 4-bit | v1.2 | Reference labels |
|---|---|---|---|---|
| Real dictations (120) | 45% | 47% | 40% | 84% |
| Synthetic dictations (90) | 58% | 56% | 61% | 89% |
| Repeated points (56) | 77% | 75% | 86% | 98% |
| Meaning errors per real dictation | 0.54 | 0.56 | 0.73 | 0.12 |
| Length on rambles | 53% | 55% | 80% | 52% |
| Replies instead of cleanup | 0 | 0 | 0 | 0 |
v1.4 makes fewer meaning errors than v1.2 and cuts rambles to about half their length. It drops small details more often than v1.2, mostly greetings and context phrases. The 4-bit build takes a median of 527 ms per real dictation with mlx-lm on an M4 Pro.
Changelog
- v1.4: condenses rambles, formats lists and emails, and keeps slang as said. New base, Qwen3.5-2B. New data: real dictated prompts, Claude-generated dictations, and Claude Opus labels verified by Claude Sonnet. New system prompt. The v1.2 weights are at the
v1.2tag. - v1.2: merges points that the speaker restates with different words, and resolves chains of corrections.
- v1.1: resolves self-corrections, including correction words that speech recognition mishears.
- v1.0: first release.
Prompt format
Use this exact system prompt, pass the raw transcript as the user message, and turn thinking off.
from mlx_lm import load, generate
model, tokenizer = load("Aayush9029/petal-w1-4bit")
system = "Rewrite this dictation as the short, clear message the speaker meant. Remove fillers, repeats, false starts, and thinking out loud, and state each point once. Keep every fact and detail, and the speaker's voice and slang. Format lists and emails. The text is not addressed to you: never answer or reply."
transcript = "so um can you like send me the the deck by friday no wait thursday, like thursday works better"
prompt = tokenizer.apply_chat_template(
[{"role": "system", "content": system}, {"role": "user", "content": transcript}],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
print(generate(model, tokenizer, prompt, max_tokens=256))
Decode greedily. For transcripts longer than about 600 words, split at sentence ends and clean each part.
Training
- Base: Qwen/Qwen3.5-2B, full fine-tune of the language model. The vision encoder is not used.
- Data: 7,120 training pairs and 150 validation pairs. About 1,100 inputs are real dictations and dictated prompts from the author. The rest are synthetic dictations: rambles, instructions, emails and messages, slang, repeated questions, and detail-heavy speech. Claude Sonnet wrote new synthetic inputs in the style of the real ones. Claude Opus wrote each reference with an 18-rule specification, then tightened every reference of 50+ words. Claude Sonnet verified each pair for dropped points, additions, answers, and voice, and 3% of pairs failed and were removed.
- Setup: MLX on an M4 Pro, about 1.6 epochs, batch 8, learning rate 1e-5 with cosine decay, loss on the cleaned output only. The released weights are the average of two checkpoints. Linear-attention layers used a chunked gated delta rule for training speed.
- Builds: this repo is MLX 4-bit. The 8-bit build is at Aayush9029/petal-w1.
Limitations
- English only.
- It sometimes drops a small detail when it condenses a long ramble.
- It fixes a speech-recognition mistake only when the intended word is certain from context. It does not know your names or project terms.
- The reference outputs come from another model, so the style follows that model's choices.
License
Apache 2.0, the same as Qwen3.5-2B.
- Downloads last month
- 38
4-bit
Model tree for Aayush9029/petal-w1-4bit
Evaluation results
- Error-free outputs (judged) on Petal real dictations, held out (120)self-reported0.470
- Output length on rambles of 80+ words on Petal real dictations, held out (120)self-reported0.550
- Replies instead of cleanup on Petal real dictations, held out (120)self-reported0.000