Views
No views yet

run_applescript tool, it emits a structured tool call with correct AppleScript to drive macOS —
app automation (Safari, Finder, Mail, Notes, Calendar, Reminders, System Events), system control,
clipboard, screenshots, ASObjC, and do shell script — ready to execute in an agent loop. Without a
tools spec, it writes AppleScript directly (hybrid).| Parameters | 16.1 B total · ~4 B active (MoE) |
| Quant | JANG_4M — 8-bit attention, 4-bit routed experts |
| Size | ~11 GB |
| Tool-calling | native (gemma tool-call format), run_applescript |
| Runtime | MLX (Apple Silicon) / Osaurus |
run_applescript call. Compile = valid AppleScript. Exec = it
runs and returns the correct result.| Tool-call emission | Compile | Exec | |
|---|---|---|---|
| Base gemma-4-26B-A4B | ✗ (writes raw, no tool calls) | ~88% | unreliable |
| AppleScript-16B-A4B-JANG_4M | 100% ⭐ | 100% ⭐ | 84% ⭐ |
1from mlx_lm import load, generate
2model, tok = load("OsaurusAI/AppleScript-16B-A4B-JANG_4M")
3tools = [{"type":"function","function":{"name":"run_applescript",
4 "description":"Execute AppleScript on macOS and return its output.",
5 "parameters":{"type":"object","properties":{"script":{"type":"string"}},"required":["script"]}}}]
6msgs = [{"role":"user","content":"Create a note titled 'Groceries' in Notes."}]
7prompt = tok.apply_chat_template(msgs, tools=tools, add_generation_prompt=True, tokenize=False)
8print(generate(model, tok, prompt=prompt, max_tokens=300))run_applescript tool call, runs the script (e.g. via osascript), and feeds
the result back. (Omit tools= to get raw AppleScript instead.)