<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: mlx</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/mlx.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2026-08-04T19:10:09+00:00</updated><author><name>Simon Willison</name></author><entry><title>PipeNetwork/minimax-h3-mlx</title><link href="https://simonwillison.net/2026/Aug/4/minimax-h3-mlx/" rel="alternate"/><published>2026-08-04T19:10:09+00:00</published><updated>2026-08-04T19:10:09+00:00</updated><id>https://simonwillison.net/2026/Aug/4/minimax-h3-mlx/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/PipeNetwork/minimax-h3-mlx"&gt;PipeNetwork/minimax-h3-mlx&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
MiniMax released &lt;a href="https://huggingface.co/MiniMaxAI/MiniMax-H3"&gt;MiniMax-H3&lt;/a&gt; two days ago - they describe it as a "a general-purpose, omni-modal generative system", which in practice means it accepts text, images, audio and video and can use them to generate up to 15 second video clips with audio included.&lt;/p&gt;
&lt;p&gt;This Python package ports it to MLX for running on Apple Silicon.&lt;/p&gt;
&lt;p&gt;I got it running on my M5 Max MacBook Pro. I cloned the repo and ran the model like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# First download the models
uvx --from huggingface_hub hf download MiniMaxAI/MiniMax-H3 \
  --include 'FL2VA/*' --exclude 'FL2VA/transformer/*'
uvx --from huggingface_hub hf download pipenetwork/MiniMax-H3-MLX-8bit

# Now run the prompt
uv run --with mlx-vlm \
  --with-requirements requirements.txt python scripts/generate.py \
  "a rainbow colored skunk leaps over a mossy log in a supermarket" \
  -o skunk.mp4 \
  -c ~/.cache/huggingface/hub/models--MiniMaxAI--MiniMax-H3/snapshots/fa9c8ab1eaa21c8ae25e7e40b83b2e6002f340af/FL2VA \
  -t ~/.cache/huggingface/hub/models--pipenetwork--MiniMax-H3-MLX-8bit/snapshots/3ac52081470b0488921c3ec3ba84a39097bf2361
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's the video I got for the prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;a rainbow colored skunk leaps over a mossy log in a supermarket&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;video
    controls loop
    preload="none"
    poster="https://static.simonwillison.net/static/2026/skunk.jpg"
    width="1344"
    height="768"
    style="display: block; width: 100%; height: auto;"
  &gt;
    &lt;source src="https://static.simonwillison.net/static/2026/skunk.web.mp4" type="video/mp4"&gt;
    Your browser does not support HTML5 video.
  &lt;/video&gt;
&lt;/p&gt;

&lt;p&gt;It downloaded ~115 GB of model files, and the video generation took just under 45 minutes.&lt;/p&gt;
&lt;p&gt;The video is impressive, but the audio is weird speech-like garbage, because I didn't provide any prompt guidance as to what the audio should be. The &lt;a href="https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/docs/VIDEO_PROMPT_WRITING_GUIDE_base_en.md"&gt;prompting guide&lt;/a&gt; (which I didn't read prior to this experiment) has a whole bunch of information on how to get this to work.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/text-to-video"&gt;text-to-video&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/minimax"&gt;minimax&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="mlx"/><category term="text-to-video"/><category term="minimax"/></entry><entry><title>Nativ: Run AI models locally on your Mac</title><link href="https://simonwillison.net/2026/Jul/21/nativ/" rel="alternate"/><published>2026-07-21T14:22:27+00:00</published><updated>2026-07-21T14:22:27+00:00</updated><id>https://simonwillison.net/2026/Jul/21/nativ/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blaizzy.github.io/nativ/"&gt;Nativ: Run AI models locally on your Mac&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Prince Canuma is the developer behind the excellent &lt;a href="https://github.com/Blaizzy/mlx-vlm"&gt;MLX-VLM&lt;/a&gt; Python library for running vision-LLMs using MLX on a Mac.&lt;/p&gt;
&lt;p&gt;I'm really excited about his new project, which wraps MLX in a full macOS desktop application. It's similar in shape to LM Studio, providing both a chat interface and a localhost API server for accessing models.&lt;/p&gt;
&lt;p&gt;The app picked up MLX models I had already tried that were present in my Hugging Face cache directory, which was a nice touch.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=48982681"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/macos"&gt;macos&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prince-canuma"&gt;prince-canuma&lt;/a&gt;&lt;/p&gt;



</summary><category term="macos"/><category term="python"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="mlx"/><category term="prince-canuma"/></entry><entry><title>microsoft/VibeVoice</title><link href="https://simonwillison.net/2026/Apr/27/vibevoice/" rel="alternate"/><published>2026-04-27T23:46:56+00:00</published><updated>2026-04-27T23:46:56+00:00</updated><id>https://simonwillison.net/2026/Apr/27/vibevoice/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/microsoft/VibeVoice"&gt;microsoft/VibeVoice&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
VibeVoice is Microsoft's Whisper-style audio model for speech-to-text, MIT licensed and with speaker diarization built into the model.&lt;/p&gt;
&lt;p&gt;Microsoft released it on January 21st, 2026 but I hadn't tried it until today. Here's a one-liner to run it on a Mac with &lt;code&gt;uv&lt;/code&gt;, &lt;a href="https://github.com/Blaizzy/mlx-audio"&gt;mlx-audio&lt;/a&gt; (by Prince Canuma) and the 5.71GB &lt;a href="https://huggingface.co/mlx-community/VibeVoice-ASR-4bit"&gt;mlx-community/VibeVoice-ASR-4bit&lt;/a&gt; MLX conversion of the &lt;a href="https://huggingface.co/microsoft/VibeVoice-ASR/tree/main"&gt;17.3GB VibeVoice-ASR&lt;/a&gt; model, in this case against a downloaded copy of my recent &lt;a href="https://simonwillison.net/2026/Apr/2/lennys-podcast/"&gt;podcast appearance with Lenny Rachitsky&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run --with mlx-audio mlx_audio.stt.generate \
  --model mlx-community/VibeVoice-ASR-4bit \
  --audio lenny.mp3 --output-path lenny \
  --format json --verbose --max-tokens 32768
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt="Screenshot of a macOS terminal running an mlx-audio speech-to-text command using the VibeVoice-ASR-4bit model on lenny.mp3, showing download progress, a warning that audio duration (99.8 min) exceeds the 59 min maximum so it's trimming, encoding/prefilling/generating progress bars, then a Transcription section with JSON segments of speakers discussing AI coding agents, followed by stats: Processing time 524.79 seconds, Prompt 26615 tokens at 50.718 tokens-per-sec, Generation 20248 tokens at 38.585 tokens-per-sec, Peak memory 30.44 GB." src="https://static.simonwillison.net/static/2026/vibevoice-terminal.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;The tool reported back:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Processing time: 524.79 seconds
Prompt: 26615 tokens, 50.718 tokens-per-sec
Generation: 20248 tokens, 38.585 tokens-per-sec
Peak memory: 30.44 GB
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So that's 8 minutes 45 seconds for an hour of audio (running on a 128GB M5 Max MacBook Pro).&lt;/p&gt;
&lt;p&gt;I've tested it against &lt;code&gt;.wav&lt;/code&gt; and &lt;code&gt;.mp3&lt;/code&gt; files and they both worked fine.&lt;/p&gt;
&lt;p&gt;If you omit &lt;code&gt;--max-tokens&lt;/code&gt; it defaults to 8192, which is enough for about 25 minutes of audio. I discovered that through trial-and-error and quadrupled it to guarantee I'd get the full hour.&lt;/p&gt;
&lt;p&gt;That command reported using 30.44GB of RAM at peak, but in Activity Monitor I observed 61.5GB of usage during the prefill stage and around 18GB during the generating phase.&lt;/p&gt;
&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/d2c716c008b3ba395785f865c6387b6f"&gt;the resulting JSON&lt;/a&gt;. The key structure looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  "text": "And an open question for me is how many other knowledge work fields are actually prone to these agent loops?",
  "start": 13.85,
  "end": 19.5,
  "duration": 5.65,
  "speaker_id": 0
},
{
  "text": "Now that we have this power, people almost underestimate what they can do with it.",
  "start": 19.5,
  "end": 22.78,
  "duration": 3.280000000000001,
  "speaker_id": 1
},
{
  "text": "Today, probably 95% of the code that I produce, I didn't type it myself. I write so much of my code on my phone. It's wild.",
  "start": 22.78,
  "end": 30.0,
  "duration": 7.219999999999999,
  "speaker_id": 0
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since that's an array of objects we can &lt;a href="https://lite.datasette.io/?json=https://gist.github.com/simonw/d2c716c008b3ba395785f865c6387b6f#/data/raw?_facet=speaker_id"&gt;open it in Datasette Lite&lt;/a&gt;, making it easier to browse.&lt;/p&gt;
&lt;p&gt;Amusingly that Datasette Lite view shows three speakers - it identified Lenny and me for the conversation, and then a separate Lenny for the voice he used for the additional intro and the sponsor reads!&lt;/p&gt;
&lt;p&gt;VibeVoice can only handle up to an hour of audio, so running the above command transcribed just the first hour of the podcast. To transcribe more than that you'd need to split the audio, ideally with a minute or so of overlap so you can avoid errors from partially transcribed words at the split point. You'd also need to then line up the identified speaker IDs across the multiple segments.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/microsoft"&gt;microsoft&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-lite"&gt;datasette-lite&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prince-canuma"&gt;prince-canuma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/speech-to-text"&gt;speech-to-text&lt;/a&gt;&lt;/p&gt;



</summary><category term="microsoft"/><category term="python"/><category term="datasette-lite"/><category term="uv"/><category term="mlx"/><category term="prince-canuma"/><category term="speech-to-text"/></entry><entry><title>Gemma 4 audio with MLX</title><link href="https://simonwillison.net/2026/Apr/12/mlx-audio/" rel="alternate"/><published>2026-04-12T23:57:53+00:00</published><updated>2026-04-12T23:57:53+00:00</updated><id>https://simonwillison.net/2026/Apr/12/mlx-audio/</id><summary type="html">
    &lt;p&gt;Thanks to a &lt;a href="https://twitter.com/RahimNathwani/status/2039961945613209852"&gt;tip from Rahim Nathwani&lt;/a&gt;, here's a &lt;code&gt;uv run&lt;/code&gt; recipe for transcribing an audio file on macOS using the 10.28 GB &lt;a href="https://huggingface.co/google/gemma-4-E2B"&gt;Gemma 4 E2B model&lt;/a&gt; with MLX and &lt;a href="https://github.com/Blaizzy/mlx-vlm"&gt;mlx-vlm&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run --python 3.13 --with mlx_vlm --with torchvision --with gradio \
  mlx_vlm.generate \
  --model google/gemma-4-e2b-it \
  --audio file.wav \
  --prompt "Transcribe this audio" \
  --max-tokens 500 \
  --temperature 1.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;audio controls style="width: 100%"&gt;
  &lt;source src="https://static.simonwillison.net/static/2026/demo-audio-for-gemma.wav" type="audio/wav"&gt;
  Your browser does not support the audio element.
&lt;/audio&gt;&lt;/p&gt;
&lt;p&gt;I tried it on &lt;a href="https://static.simonwillison.net/static/2026/demo-audio-for-gemma.wav"&gt;this 14 second &lt;code&gt;.wav&lt;/code&gt; file&lt;/a&gt; and it output the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This front here is a quick voice memo. I want to try it out with MLX VLM. Just going to see if it can be transcribed by Gemma and how that works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(That was supposed to be "This right here..." and "... how well that works" but I can hear why it misinterpreted that as "front" and "how that works".)&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemma"&gt;gemma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/speech-to-text"&gt;speech-to-text&lt;/a&gt;&lt;/p&gt;



</summary><category term="python"/><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="uv"/><category term="mlx"/><category term="gemma"/><category term="speech-to-text"/></entry><entry><title>Autoresearching Apple's "LLM in a Flash" to run Qwen 397B locally</title><link href="https://simonwillison.net/2026/Mar/18/llm-in-a-flash/" rel="alternate"/><published>2026-03-18T23:56:46+00:00</published><updated>2026-03-18T23:56:46+00:00</updated><id>https://simonwillison.net/2026/Mar/18/llm-in-a-flash/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://twitter.com/danveloper/status/2034353876753592372"&gt;Autoresearching Apple&amp;#x27;s &amp;quot;LLM in a Flash&amp;quot; to run Qwen 397B locally&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Here's a fascinating piece of research by Dan Woods, who managed to get a custom version of &lt;a href="https://huggingface.co/Qwen/Qwen3.5-397B-A17B/tree/main"&gt;Qwen3.5-397B-A17B&lt;/a&gt; running at 5.5+ tokens/second on a 48GB MacBook Pro M3 Max despite that model taking up 209GB (120GB quantized) on disk.&lt;/p&gt;
&lt;p&gt;Qwen3.5-397B-A17B is a Mixture-of-Experts (MoE) model, which means that each token only needs to run against a subset of the overall model weights. These expert weights can be streamed into memory from SSD, saving them from all needing to be held in RAM at the same time.&lt;/p&gt;
&lt;p&gt;Dan used techniques described in Apple's 2023 paper &lt;a href="https://arxiv.org/abs/2312.11514"&gt;LLM in a flash: Efficient Large Language Model Inference with Limited Memory&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This paper tackles the challenge of efficiently running LLMs that exceed the available DRAM capacity by storing the model parameters in flash memory, but bringing them on demand to DRAM. Our method involves constructing an inference cost model that takes into account the characteristics of flash memory, guiding us to optimize in two critical areas: reducing the volume of data transferred from flash and reading data in larger, more contiguous chunks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He fed the paper to Claude Code and used a variant of Andrej Karpathy's &lt;a href="https://simonwillison.net/2026/Mar/13/liquid/"&gt;autoresearch pattern&lt;/a&gt; to have Claude run 90 experiments and produce MLX Objective-C and Metal code that ran the model as efficiently as possible.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/danveloper/flash-moe"&gt;danveloper/flash-moe&lt;/a&gt; has the resulting code plus &lt;a href="https://github.com/danveloper/flash-moe/blob/main/paper/flash_moe.pdf"&gt;a PDF paper&lt;/a&gt; mostly written by Claude Opus 4.6 describing the experiment in full.&lt;/p&gt;
&lt;p&gt;The final model has the experts quantized to 2-bit, but the non-expert parts of the model such as the embedding table and routing matrices are kept at their original precision, adding up to 5.5GB which stays resident in memory while the model is running.&lt;/p&gt;
&lt;p&gt;Qwen 3.5 usually runs 10 experts per token, but this setup dropped that to 4 while claiming that the biggest quality drop-off occurred at 3.&lt;/p&gt;
&lt;p&gt;It's not clear to me how much the quality of the model results are affected. Claude claimed that "Output quality at 2-bit is indistinguishable from 4-bit for these evaluations", but the description of the evaluations it ran is quite thin.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Dan's &lt;a href="https://twitter.com/danveloper/status/2034686509748462022"&gt;latest version&lt;/a&gt; upgrades to 4-bit quantization of the experts (209GB on disk, 4.36 tokens/second) after finding that the 2-bit version broke tool calling while 4-bit handles that well.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/autoresearch"&gt;autoresearch&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="qwen"/><category term="mlx"/><category term="autoresearch"/></entry><entry><title>Qwen3-TTS Family is Now Open Sourced: Voice Design, Clone, and Generation</title><link href="https://simonwillison.net/2026/Jan/22/qwen3-tts/" rel="alternate"/><published>2026-01-22T17:42:34+00:00</published><updated>2026-01-22T17:42:34+00:00</updated><id>https://simonwillison.net/2026/Jan/22/qwen3-tts/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://qwen.ai/blog?id=qwen3tts-0115"&gt;Qwen3-TTS Family is Now Open Sourced: Voice Design, Clone, and Generation&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I haven't been paying much attention to the state-of-the-art in speech generation models other than noting that they've got &lt;em&gt;really good&lt;/em&gt;, so I can't speak for how notable this new release from Qwen is.&lt;/p&gt;
&lt;p&gt;From &lt;a href="https://github.com/QwenLM/Qwen3-TTS/blob/main/assets/Qwen3_TTS.pdf"&gt;the accompanying paper&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this report, we present the Qwen3-TTS series, a family of advanced multilingual, controllable, robust, and streaming text-to-speech models. Qwen3-TTS supports state-of- the-art 3-second voice cloning and description-based control, allowing both the creation of entirely novel voices and fine-grained manipulation over the output speech. Trained on over 5 million hours of speech data spanning 10 languages, Qwen3-TTS adopts a dual-track LM architecture for real-time synthesis [...]. Extensive experiments indicate state-of-the-art performance across diverse objective and subjective benchmark (e.g., TTS multilingual test set, InstructTTSEval, and our long speech test set). To facilitate community research and development, we release both tokenizers and models under the Apache 2.0 license.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To give an idea of size, &lt;a href="https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-Base"&gt;Qwen/Qwen3-TTS-12Hz-1.7B-Base&lt;/a&gt; is 4.54GB on Hugging Face and &lt;a href="https://huggingface.co/Qwen/Qwen3-TTS-12Hz-0.6B-Base"&gt;Qwen/Qwen3-TTS-12Hz-0.6B-Base&lt;/a&gt; is 2.52GB.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://huggingface.co/spaces/Qwen/Qwen3-TTS"&gt;Hugging Face demo&lt;/a&gt; lets you try out the 0.6B and 1.7B models for free in your browser, including voice cloning:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of a Qwen3-TTS voice cloning web interface with three tabs at top: &amp;quot;Voice Design&amp;quot;, &amp;quot;Voice Clone (Base)&amp;quot; (selected), and &amp;quot;TTS (CustomVoice)&amp;quot;. The page is titled &amp;quot;Clone Voice from Reference Audio&amp;quot; and has two main sections. Left section: &amp;quot;Reference Audio (Upload a voice sample clone)&amp;quot; showing an audio waveform player at 0:00/0:34 with playback controls, upload and microphone icons, followed by &amp;quot;Reference Text (Transcript of the reference audio)&amp;quot; containing three paragraphs: &amp;quot;Simon Willison is the creator of Datasette, an open source tool for exploring and publishing data. He currently works full-time building open source tools for data journalism, built around Datasette and SQLite. Prior to becoming an independent open source developer, Simon was an engineering director at Eventbrite. Simon joined Eventbrite through their acquisition of Lanyrd, a Y Combinator funded company he co-founded in 2010. He is a co-creator of the Django Web Framework, and has been blogging about web development and programming since 2002 at simonwillison.net&amp;quot;. Right section: &amp;quot;Target Text (Text to synthesize with cloned voice)&amp;quot; containing text about Qwen3-TTS speech generation capabilities, with &amp;quot;Language&amp;quot; dropdown set to &amp;quot;Auto&amp;quot; and &amp;quot;Model Size&amp;quot; dropdown set to &amp;quot;1.7B&amp;quot;, and a purple &amp;quot;Clone &amp;amp; Generate&amp;quot; button at bottom." src="https://static.simonwillison.net/static/2026/qwen-voice-clone.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I tried this out by recording myself reading &lt;a href="https://simonwillison.net/about/"&gt;my about page&lt;/a&gt; and then having Qwen3-TTS generate audio of me reading the Qwen3-TTS announcement post. Here's the result:&lt;/p&gt;
&lt;p&gt;&lt;audio controls style="width: 100%"&gt;
  &lt;source src="https://static.simonwillison.net/static/2026/qwen-tts-clone.wav" type="audio/wav"&gt;
  Your browser does not support the audio element.
&lt;/audio&gt;&lt;/p&gt;
&lt;p&gt;It's important that everyone understands that voice cloning is now something that's available to anyone with a GPU and a few GBs of VRAM... or in this case a web browser that can access Hugging Face.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Prince Canuma &lt;a href="https://x.com/Prince_Canuma/status/2014453857019904423"&gt;got this working&lt;/a&gt; with his &lt;a href="https://pypi.org/project/mlx-audio/"&gt;mlx-audio&lt;/a&gt; library. I &lt;a href="https://claude.ai/share/2e01ad60-ca38-4e14-ab60-74eaa45b2fbd"&gt;had Claude&lt;/a&gt; turn that into &lt;a href="https://github.com/simonw/tools/blob/main/python/q3_tts.py"&gt;a CLI tool&lt;/a&gt; which you can run with &lt;code&gt;uv&lt;/code&gt; ike this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run https://tools.simonwillison.net/python/q3_tts.py \
  'I am a pirate, give me your gold!' \
  -i 'gruff voice' -o pirate.wav
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;-i&lt;/code&gt; option lets you use a prompt to describe the voice it should use. On first run this downloads a 4.5GB model file from Hugging Face.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=46719229"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/text-to-speech"&gt;text-to-speech&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hugging-face"&gt;hugging-face&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prince-canuma"&gt;prince-canuma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="text-to-speech"/><category term="ai"/><category term="generative-ai"/><category term="hugging-face"/><category term="uv"/><category term="qwen"/><category term="mlx"/><category term="prince-canuma"/><category term="ai-in-china"/></entry><entry><title>parakeet-mlx</title><link href="https://simonwillison.net/2025/Nov/14/parakeet-mlx/" rel="alternate"/><published>2025-11-14T20:00:32+00:00</published><updated>2025-11-14T20:00:32+00:00</updated><id>https://simonwillison.net/2025/Nov/14/parakeet-mlx/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/senstella/parakeet-mlx"&gt;parakeet-mlx&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Neat MLX project by Senstella bringing NVIDIA's &lt;a href="https://huggingface.co/nvidia/parakeet-tdt-0.6b-v2"&gt;Parakeet&lt;/a&gt; ASR (Automatic Speech Recognition, like Whisper) model to to Apple's MLX framework.&lt;/p&gt;
&lt;p&gt;It's packaged as a Python CLI tool, so you can run it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uvx parakeet-mlx default_tc.mp3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first time I ran this it downloaded a 2.5GB model file.&lt;/p&gt;
&lt;p&gt;Once that was fetched it took 53 seconds to transcribe a 65MB 1hr 1m 28s podcast episode (&lt;a href="https://accessibility-and-gen-ai.simplecast.com/episodes/ep-6-simon-willison-datasette"&gt;this one&lt;/a&gt;) and produced &lt;a href="https://gist.github.com/simonw/ea1dc73029bf080676839289e705a2a2"&gt;this default_tc.srt file&lt;/a&gt; with a timestamped transcript of the audio I fed into it. The quality appears to be very high.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nvidia"&gt;nvidia&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/speech-to-text"&gt;speech-to-text&lt;/a&gt;&lt;/p&gt;



</summary><category term="python"/><category term="ai"/><category term="nvidia"/><category term="uv"/><category term="mlx"/><category term="speech-to-text"/></entry><entry><title>Kimi K2 Thinking</title><link href="https://simonwillison.net/2025/Nov/6/kimi-k2-thinking/" rel="alternate"/><published>2025-11-06T23:53:06+00:00</published><updated>2025-11-06T23:53:06+00:00</updated><id>https://simonwillison.net/2025/Nov/6/kimi-k2-thinking/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/moonshotai/Kimi-K2-Thinking"&gt;Kimi K2 Thinking&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Chinese AI lab Moonshot's Kimi K2 established itself as one of the largest open weight models - 1 trillion parameters - &lt;a href="https://simonwillison.net/2025/Jul/11/kimi-k2/"&gt;back in July&lt;/a&gt;. They've now released the Thinking version, also a trillion parameters (MoE, 32B active) and also under their custom modified (so &lt;a href="https://simonwillison.net/2025/Jul/11/kimi-k2/#kimi-license"&gt;not quite open source&lt;/a&gt;) MIT license.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Starting with Kimi K2, we built it as a thinking agent that reasons step-by-step while dynamically invoking tools. It sets a new state-of-the-art on Humanity's Last Exam (HLE), BrowseComp, and other benchmarks by dramatically scaling multi-step reasoning depth and maintaining stable tool-use across 200–300 sequential calls. At the same time, K2 Thinking is a native INT4 quantization model with 256k context window, achieving lossless reductions in inference latency and GPU memory usage.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This one is only 594GB on Hugging Face - Kimi K2 was 1.03TB - which I think is due to the new INT4 quantization. This makes the model both cheaper and faster to host.&lt;/p&gt;
&lt;p&gt;So far the only people hosting it are Moonshot themselves. I tried it out both via &lt;a href="https://platform.moonshot.ai"&gt;their own API&lt;/a&gt; and via &lt;a href="https://openrouter.ai/moonshotai/kimi-k2-thinking/providers"&gt;the OpenRouter proxy to it&lt;/a&gt;, via the &lt;a href="https://github.com/ghostofpokemon/llm-moonshot"&gt;llm-moonshot&lt;/a&gt; plugin (by NickMystic) and my &lt;a href="https://github.com/simonw/llm-openrouter"&gt;llm-openrouter&lt;/a&gt; plugin respectively.&lt;/p&gt;
&lt;p&gt;The buzz around this model so far is very positive. Could this be the first open weight model that's competitive with the latest from OpenAI and Anthropic, especially for long-running agentic tool call sequences?&lt;/p&gt;
&lt;p&gt;Moonshot AI's &lt;a href="https://moonshotai.github.io/Kimi-K2/thinking.html"&gt;self-reported benchmark scores&lt;/a&gt; show K2 Thinking beating the top OpenAI and Anthropic models (GPT-5 and Sonnet 4.5 Thinking) at "Agentic Reasoning" and "Agentic Search" but not quite top for "Coding":&lt;/p&gt;
&lt;p&gt;&lt;img alt="Comparison bar chart showing agentic reasoning, search, and coding benchmark performance scores across three AI systems (K, OpenAI, and AI) on tasks including Humanity's Last Exam (44.9, 41.7, 32.0), BrowseComp (60.2, 54.9, 24.1), Seal-0 (56.3, 51.4, 53.4), SWE-Multilingual (61.1, 55.3, 68.0), SWE-bench Verified (71.3, 74.9, 77.2), and LiveCodeBench V6 (83.1, 87.0, 64.0), with category descriptions including &amp;quot;Expert-level questions across subjects&amp;quot;, &amp;quot;Agentic search &amp;amp; browsing&amp;quot;, &amp;quot;Real-world latest information collection&amp;quot;, &amp;quot;Agentic coding&amp;quot;, and &amp;quot;Competitive programming&amp;quot;." src="https://static.simonwillison.net/static/2025/kimi-k2-thinking-benchmarks.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I ran a couple of pelican tests:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-moonshot
llm keys set moonshot # paste key
llm -m moonshot/kimi-k2-thinking 'Generate an SVG of a pelican riding a bicycle'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt="Sonnet 4.5 described this as: Cartoon illustration of a white duck or goose with an orange beak and gray wings riding a bicycle with a red frame and light blue wheels against a light blue background." src="https://static.simonwillison.net/static/2025/k2-thinking.png" /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-openrouter
llm keys set openrouter # paste key
llm -m openrouter/moonshotai/kimi-k2-thinking \
  'Generate an SVG of a pelican riding a bicycle'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt="Sonnet 4.5: Minimalist cartoon illustration of a white bird with an orange beak and feet standing on a triangular-framed penny-farthing style bicycle with gray-hubbed wheels and a propeller hat on its head, against a light background with dotted lines and a brown ground line." src="https://static.simonwillison.net/static/2025/k2-thinking-openrouter.png" /&gt;&lt;/p&gt;
&lt;p&gt;Artificial Analysis &lt;a href="https://x.com/ArtificialAnlys/status/1986541785511043536"&gt;said&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Kimi K2 Thinking achieves 93% in 𝜏²-Bench Telecom, an agentic tool use benchmark where the model acts as a customer service agent. This is the highest score we have independently measured. Tool use in long horizon agentic contexts was a strength of Kimi K2 Instruct and it appears this new Thinking variant makes substantial gains&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;CNBC quoted a source who &lt;a href="https://www.cnbc.com/2025/11/06/alibaba-backed-moonshot-releases-new-ai-model-kimi-k2-thinking.html"&gt;provided the training price&lt;/a&gt; for the model:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Kimi K2 Thinking model cost $4.6 million to train, according to a source familiar with the matter. [...] CNBC was unable to independently verify the DeepSeek or Kimi figures.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;MLX developer Awni Hannun &lt;a href="https://x.com/awnihannun/status/1986601104130646266"&gt;got it working&lt;/a&gt; on two 512GB M3 Ultra Mac Studios:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The new 1 Trillion parameter Kimi K2 Thinking model runs well on 2 M3 Ultras in its native format - no loss in quality!&lt;/p&gt;
&lt;p&gt;The model was quantization aware trained (qat) at int4.&lt;/p&gt;
&lt;p&gt;Here it generated ~3500 tokens at 15 toks/sec using pipeline-parallelism in mlx-lm&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here's &lt;a href="https://huggingface.co/mlx-community/Kimi-K2-Thinking"&gt;the 658GB mlx-community model&lt;/a&gt;.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/openrouter"&gt;openrouter&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/artificial-analysis"&gt;artificial-analysis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/moonshot"&gt;moonshot&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kimi"&gt;kimi&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="llm"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="llm-reasoning"/><category term="llm-release"/><category term="openrouter"/><category term="ai-in-china"/><category term="artificial-analysis"/><category term="moonshot"/><category term="kimi"/></entry><entry><title>Locally AI</title><link href="https://simonwillison.net/2025/Sep/21/locally-ai/" rel="alternate"/><published>2025-09-21T23:56:14+00:00</published><updated>2025-09-21T23:56:14+00:00</updated><id>https://simonwillison.net/2025/Sep/21/locally-ai/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://apps.apple.com/us/app/locally-ai-local-ai-chat/id6741426692"&gt;Locally AI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Handy new iOS app by Adrien Grondin for running local LLMs on your phone. It just added support for the new iOS 26 Apple Foundation model, so you can install this app and instantly start a conversation with that model without any additional download.&lt;/p&gt;
&lt;p&gt;The app can also run a variety of other models using MLX, including members of the Gemma, Llama 3.2, and and Qwen families.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/apple"&gt;apple&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ios"&gt;ios&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;&lt;/p&gt;



</summary><category term="apple"/><category term="ios"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="mlx"/></entry><entry><title>XBai o4</title><link href="https://simonwillison.net/2025/Aug/3/xbai-o4/" rel="alternate"/><published>2025-08-03T22:21:17+00:00</published><updated>2025-08-03T22:21:17+00:00</updated><id>https://simonwillison.net/2025/Aug/3/xbai-o4/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/MetaStoneTec/XBai-o4"&gt;XBai o4&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Yet &lt;em&gt;another&lt;/em&gt; open source (Apache 2.0) LLM from a Chinese AI lab. This model card claims:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;XBai o4&lt;/strong&gt; excels in complex reasoning capabilities and has now completely surpassed OpenAI-o3-mini in Medium mode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This a 32.8 billion parameter model released by MetaStone AI, a new-to-me lab who released their first model in March - &lt;a href="https://huggingface.co/MetaStoneTec/MetaStone-L1-7B"&gt;MetaStone-L1-7B&lt;/a&gt;, then followed that with MetaStone-S1 &lt;a href="https://huggingface.co/MetaStoneTec/MetaStone-S1-1.5B"&gt;1.5B&lt;/a&gt;, &lt;a href="https://huggingface.co/MetaStoneTec/MetaStone-S1-7B"&gt;7B&lt;/a&gt; and &lt;a href="https://huggingface.co/MetaStoneTec/MetaStone-S1-32B"&gt;32B&lt;/a&gt; in July and now XBai o4 in August.&lt;/p&gt;
&lt;p&gt;The MetaStone-S1 models were accompanied with a paper, &lt;a href="https://arxiv.org/abs/2507.01951"&gt;Test-Time Scaling with Reflective Generative Model&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There is &lt;em&gt;very&lt;/em&gt; little information available on the English-language web about MetaStone AI. Their paper shows a relationship with USTC, &lt;a href="https://en.wikipedia.org/wiki/University_of_Science_and_Technology_of_China"&gt;University of Science and Technology of China&lt;/a&gt; in Hefei. One of their researchers &lt;a href="https://x.com/WangMagic_/status/1951690465222217872"&gt;confirmed on Twitter&lt;/a&gt; that their CEO is from &lt;a href="https://en.wikipedia.org/wiki/Kuaishou"&gt;KWAI&lt;/a&gt; which lead me to &lt;a href="https://www.qbitai.com/2024/07/168071.html"&gt;this Chinese language article&lt;/a&gt; from July last year about Li Yan, formerly of KWAI and now the founder of Wen Xiaobai and &lt;a href="https://x.com/simonw/status/1951694450369208361"&gt;evidently&lt;/a&gt; &lt;a href="https://x.com/WangMagic_/status/1951694611191324929"&gt;now&lt;/a&gt; the CEO of MetaStone. &lt;a href="https://www.wenxiaobai.com"&gt;www.wenxiaobai.com&lt;/a&gt; is listed as the "official website" linked to from &lt;a href="https://github.com/MetaStone-AI/XBai-o4"&gt;the XBai-o4 README&lt;/a&gt; on GitHub.&lt;/p&gt;
&lt;p&gt;Ivan Fioravanti &lt;a href="https://huggingface.co/mlx-community/models?search=xbai-o4"&gt;got it working under MLX&lt;/a&gt; in 4bit, 5bit, 6bit, 8bit and 4bit-DWQ sizes. I tried his &lt;a href="https://huggingface.co/mlx-community/XBai-o4-6bit"&gt;6bit one&lt;/a&gt; (a 24.81GB download) in LM Studio and had it "Generate an SVG of a pelican riding a bicycle". It thought for 39.49 seconds (&lt;a href="https://gist.github.com/simonw/78182fc3409e36f8d22217992967b9d6#response"&gt;thinking trace here&lt;/a&gt;) and gave me this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The pelican is blue and looks a little like a sad elephant. The bicycle looks more like a flat motorbike. The pelican has a blue tail and orange legs." src="https://static.simonwillison.net/static/2025/xbai-o4-pelican.png" /&gt;&lt;/p&gt;
&lt;p&gt;I also had it "Write an HTML and JavaScript page implementing space invaders", which you can &lt;a href="https://tools.simonwillison.net/space-invaders-xbai-o4-6bit-mlx"&gt;try out here&lt;/a&gt;. It's not great - the invaders don't fire bullets (it listed that as a "potential improvement") and I don't think it's winnable due to timing issues, but it's an interesting addition to &lt;a href="https://simonwillison.net/tags/space-invaders/"&gt;my collection&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;LM Studio reported a constant memory usage of 25.54GB and according to Activity Monitor used 87.5% of my GPU and around 39% of a CPU core.&lt;/p&gt;
&lt;p&gt;It did a &lt;em&gt;lot&lt;/em&gt; of work in the thinking trace - which took 10m35s! - including writing the first draft of much of the code that ended up in the finished result. Here's an extract:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let me think of variables:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;let enemyDirection = 1; // 1 for right, -1 for left&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the game loop:
&lt;code&gt;enemies.forEach(enemy =&amp;gt; {&amp;gt;
    enemy.x += enemyDirection * enemy.dx;&amp;gt;
});&lt;/code&gt;
Then check if any enemy is out of bounds. If so, reverse direction and move all enemies down.&lt;/p&gt;
&lt;p&gt;But how to check if any enemy is at the edge?&lt;/p&gt;
&lt;p&gt;Maybe find the max x of all enemies and see if it exceeds &lt;code&gt;canvas.width - enemy.width&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, track the leftmost and rightmost positions of enemies. Maybe a bit complex.&lt;/p&gt;
&lt;p&gt;For simplicity, perhaps check if any enemy's &lt;code&gt;x + width &amp;gt; canvas.width or x &amp;lt; 0&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/457d55a5c426e0bbea9d47aee225c391"&gt;the full transcript&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My initial impressions are that I'm not as impressed with this model for running on my own laptop as I was with &lt;a href="https://simonwillison.net/2025/Jul/31/qwen3-coder-flash/"&gt;Qwen3-Coder-30B-A3B-Instruct&lt;/a&gt; or &lt;a href="https://simonwillison.net/2025/Jul/29/space-invaders/"&gt;GLM-4.5 Air&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But... how extraordinary is it that &lt;em&gt;another&lt;/em&gt; Chinese AI lab has been able to produce a competitive model, this time with far less fanfare than we've seen from Qwen and Moonshot AI and Z.ai.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://x.com/ivanfioravanti/status/1951643205985816807"&gt;@ivanfioravanti&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lm-studio"&gt;lm-studio&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/space-invaders"&gt;space-invaders&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ivan-fioravanti"&gt;ivan-fioravanti&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="llm-reasoning"/><category term="llm-release"/><category term="lm-studio"/><category term="ai-in-china"/><category term="space-invaders"/><category term="ivan-fioravanti"/></entry><entry><title>Qwen3-30B-A3B-Instruct-2507</title><link href="https://simonwillison.net/2025/Jul/29/qwen3-30b-a3b-instruct-2507/" rel="alternate"/><published>2025-07-29T18:57:33+00:00</published><updated>2025-07-29T18:57:33+00:00</updated><id>https://simonwillison.net/2025/Jul/29/qwen3-30b-a3b-instruct-2507/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/Qwen/Qwen3-30B-A3B-Instruct-2507"&gt;Qwen3-30B-A3B-Instruct-2507&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
New model update from Qwen, improving on their previous &lt;a href="https://simonwillison.net/2025/Apr/29/qwen-3/"&gt;Qwen3-30B-A3B release&lt;/a&gt; from late April. In &lt;a href="https://x.com/Alibaba_Qwen/status/1950227114793586867"&gt;their tweet&lt;/a&gt; they said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Smarter, faster, and local deployment-friendly.&lt;/p&gt;
&lt;p&gt;✨ Key Enhancements:&lt;br&gt;
✅ Enhanced reasoning, coding, and math skills&lt;br&gt;
✅ Broader multilingual knowledge&lt;br&gt;
✅ Improved long-context understanding (up to 256K tokens)&lt;br&gt;
✅ Better alignment with user intent and open-ended tasks&lt;br&gt;
✅ No more &lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt; blocks — now operating exclusively in non-thinking mode&lt;br&gt;&lt;/p&gt;
&lt;p&gt;🔧 With 3B activated parameters, it's approaching the performance of GPT-4o and Qwen3-235B-A22B Non-Thinking&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I tried &lt;a href="https://chat.qwen.ai/?model=Qwen3-30B-A3B-2507"&gt;the chat.qwen.ai&lt;/a&gt; hosted model with "Generate an SVG of a pelican riding a bicycle" and &lt;a href="https://gist.github.com/simonw/a498d4b2df887d079a9e338f8c4e5006"&gt;got this&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="This one is cute: blue sky, green grass, the sun is shining. The bicycle is a red block with wheels that looks more like a toy car. The pelican doesn't look like a pelican and has a quirky smile printed on its beak." src="https://static.simonwillison.net/static/2025/Qwen3-30B-A3B-2507.png" /&gt;&lt;/p&gt;
&lt;p&gt;I particularly enjoyed this detail from the SVG source code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Bonus: Pelican's smile --&amp;gt;
&amp;lt;path d="M245,145 Q250,150 255,145" fill="none" stroke="#d4a037" stroke-width="2"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I went looking for quantized versions that could fit on my Mac and found &lt;a href="https://huggingface.co/lmstudio-community/Qwen3-30B-A3B-Instruct-2507-MLX-8bit"&gt;lmstudio-community/Qwen3-30B-A3B-Instruct-2507-MLX-8bit&lt;/a&gt; from &lt;a href="https://lmstudio.ai/"&gt;LM Studio&lt;/a&gt;. Getting that up and running was a 32.46GB download and it appears to use just over 30GB of RAM.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://gist.github.com/simonw/d608dc37cb7871f12caf8fbc0657fcad"&gt;pelican I got from that one&lt;/a&gt; wasn't as good:&lt;/p&gt;
&lt;p&gt;&lt;img alt="It looks more like a tall yellow hen chick riding a segway" src="https://static.simonwillison.net/static/2025/qwen3-30b-a3b-instruct-2507-mlx.png" /&gt;&lt;/p&gt;
&lt;p id="space-invaders"&gt;I then tried that local model on the "Write an HTML and JavaScript page implementing space invaders" task &lt;a href="https://simonwillison.net/2025/Jul/29/space-invaders/"&gt;that I ran against GLM-4.5 Air&lt;/a&gt;. The output &lt;a href="https://gist.github.com/simonw/965111fd6fac320b7eec50710c1761db"&gt;looked promising&lt;/a&gt;, in particular it seemed to be putting more effort into the design of the invaders (GLM-4.5 Air just used rectangles):&lt;/p&gt;

&lt;pre&gt;&lt;span class="pl-c"&gt;// Draw enemy ship&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;fillStyle&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;color&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

&lt;span class="pl-c"&gt;// Ship body&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;height&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

&lt;span class="pl-c"&gt;// Enemy eyes&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;fillStyle&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s"&gt;'#fff'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;6&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;10&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

&lt;span class="pl-c"&gt;// Enemy antennae&lt;/span&gt;
&lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;fillStyle&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s"&gt;'#f00'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;if&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;type&lt;/span&gt; &lt;span class="pl-c1"&gt;===&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-c"&gt;// Basic enemy&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt; &lt;span class="pl-c1"&gt;/&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;else&lt;/span&gt; &lt;span class="pl-k"&gt;if&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;type&lt;/span&gt; &lt;span class="pl-c1"&gt;===&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-c"&gt;// Fast enemy&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt; &lt;span class="pl-c1"&gt;/&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;3&lt;/span&gt; &lt;span class="pl-c1"&gt;*&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-c1"&gt;/&lt;/span&gt; &lt;span class="pl-c1"&gt;4&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;else&lt;/span&gt; &lt;span class="pl-k"&gt;if&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;type&lt;/span&gt; &lt;span class="pl-c1"&gt;===&lt;/span&gt; &lt;span class="pl-c1"&gt;3&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-c"&gt;// Armored enemy&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt; &lt;span class="pl-c1"&gt;/&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;8&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;8&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;fillStyle&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s"&gt;'#0f0'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
    &lt;span class="pl-s1"&gt;ctx&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;fillRect&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;x&lt;/span&gt; &lt;span class="pl-c1"&gt;+&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;width&lt;/span&gt; &lt;span class="pl-c1"&gt;/&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;this&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;y&lt;/span&gt; &lt;span class="pl-c1"&gt;-&lt;/span&gt; &lt;span class="pl-c1"&gt;6&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;2&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-c1"&gt;3&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;But &lt;a href="https://static.simonwillison.net/static/2025/qwen3-30b-a3b-instruct-2507-mlx-space-invaders.html"&gt;the resulting code&lt;/a&gt; didn't actually work:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Black screen - a row of good looking space invaders advances across the screen for a moment... and then the entire screen goes blank." src="https://static.simonwillison.net/static/2025/qwen3-30b-a3b-instruct-2507-mlx-space-invaders.gif" /&gt;&lt;/p&gt;
&lt;p&gt;That same prompt against the unquantized Qwen-hosted model produced &lt;a href="https://gist.github.com/simonw/b61d161a8a969e4558c812a64dadbb45"&gt;a different result&lt;/a&gt; which sadly also resulted in an &lt;a href="https://static.simonwillison.net/static/2025/Qwen3-30B-A3B-2507-space-invaders.html"&gt;unplayable game&lt;/a&gt; - this time because everything moved too fast.&lt;/p&gt;
&lt;p&gt;This new Qwen model is a non-reasoning model, whereas GLM-4.5 and GLM-4.5 Air are both reasoners. It looks like at this scale the "reasoning" may make a material difference in terms of getting code that works out of the box.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lm-studio"&gt;lm-studio&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/space-invaders"&gt;space-invaders&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="qwen"/><category term="mlx"/><category term="llm-reasoning"/><category term="llm-release"/><category term="lm-studio"/><category term="ai-in-china"/><category term="space-invaders"/></entry><entry><title>My 2.5 year old laptop can write Space Invaders in JavaScript now, using GLM-4.5 Air and MLX</title><link href="https://simonwillison.net/2025/Jul/29/space-invaders/" rel="alternate"/><published>2025-07-29T13:02:39+00:00</published><updated>2025-07-29T13:02:39+00:00</updated><id>https://simonwillison.net/2025/Jul/29/space-invaders/</id><summary type="html">
    &lt;p&gt;I wrote about the new &lt;a href="https://simonwillison.net/2025/Jul/28/glm-45/"&gt;GLM-4.5&lt;/a&gt; model family yesterday - new open weight (MIT licensed) models from &lt;a href="https://z.ai/"&gt;Z.ai&lt;/a&gt; in China which their benchmarks claim score highly in coding even against models such as Claude Sonnet 4.&lt;/p&gt;
&lt;p&gt;The models are pretty big - the smaller GLM-4.5 Air model is still 106 billion total parameters, which &lt;a href="https://huggingface.co/zai-org/GLM-4.5-Air"&gt;is 205.78GB&lt;/a&gt; on Hugging Face.&lt;/p&gt;
&lt;p&gt;Ivan Fioravanti &lt;a href="https://x.com/ivanfioravanti/status/1949911755028910557"&gt;built&lt;/a&gt; this &lt;a href="https://huggingface.co/mlx-community/GLM-4.5-Air-3bit"&gt;44GB 3bit quantized version for MLX&lt;/a&gt;, specifically sized so people with 64GB machines could have a chance of running it. I tried it out... and it works &lt;em&gt;extremely well&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I fed it the following prompt:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;Write an HTML and JavaScript page implementing space invaders&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And it churned away for a while and produced &lt;a href="https://tools.simonwillison.net/space-invaders-GLM-4.5-Air-3bit"&gt;the following&lt;/a&gt;:&lt;/p&gt;

&lt;div style="max-width: 100%; margin-bottom: 0.4em"&gt;
    &lt;video controls="controls" preload="none" aria-label="Space Invaders" poster="https://static.simonwillison.net/static/2025/space-invaders.jpg" loop="loop" style="width: 100%; height: auto;" muted="muted"&gt;
        &lt;source src="https://static.simonwillison.net/static/2025/space-invaders.mp4" type="video/mp4" /&gt;
    &lt;/video&gt;
&lt;/div&gt;

&lt;p&gt;Clearly this isn't a particularly novel example, but I still think it's noteworthy that a model running on my 2.5 year old laptop (a 64GB MacBook Pro M2) is able to produce code like this - especially code that worked first time with no further edits needed.&lt;/p&gt;

&lt;h4 id="how-i-ran-the-model"&gt;How I ran the model&lt;/h4&gt;

&lt;p&gt;I had to run it using the current &lt;code&gt;main&lt;/code&gt; branch of the &lt;a href="https://github.com/ml-explore/mlx-lm"&gt;mlx-lm&lt;/a&gt; library (to ensure I had &lt;a href="https://github.com/ml-explore/mlx-lm/commit/489e63376b963ac02b3b7223f778dbecc164716b"&gt;this commit&lt;/a&gt; adding &lt;code&gt;glm4_moe&lt;/code&gt; support). I ran that using &lt;a href="https://github.com/astral-sh/uv"&gt;uv&lt;/a&gt; like this:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;uv run \
  --with &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;https://github.com/ml-explore/mlx-lm/archive/489e63376b963ac02b3b7223f778dbecc164716b.zip&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt; \
  python&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then in that Python interpreter I used the standard recipe for running MLX models:&lt;/p&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s1"&gt;mlx_lm&lt;/span&gt; &lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;load&lt;/span&gt;, &lt;span class="pl-s1"&gt;generate&lt;/span&gt;
&lt;span class="pl-s1"&gt;model&lt;/span&gt;, &lt;span class="pl-s1"&gt;tokenizer&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;load&lt;/span&gt;(&lt;span class="pl-s"&gt;"mlx-community/GLM-4.5-Air-3bit"&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;That downloaded 44GB of model weights to my  &lt;code&gt;~/.cache/huggingface/hub/models--mlx-community--GLM-4.5-Air-3bit&lt;/code&gt; folder.&lt;/p&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;pre&gt;&lt;span class="pl-s1"&gt;prompt&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s"&gt;"Write an HTML and JavaScript page implementing space invaders"&lt;/span&gt;
&lt;span class="pl-s1"&gt;messages&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; [{&lt;span class="pl-s"&gt;"role"&lt;/span&gt;: &lt;span class="pl-s"&gt;"user"&lt;/span&gt;, &lt;span class="pl-s"&gt;"content"&lt;/span&gt;: &lt;span class="pl-s1"&gt;prompt&lt;/span&gt;}]
&lt;span class="pl-s1"&gt;prompt&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;tokenizer&lt;/span&gt;.&lt;span class="pl-c1"&gt;apply_chat_template&lt;/span&gt;(
    &lt;span class="pl-s1"&gt;messages&lt;/span&gt;,
    &lt;span class="pl-s1"&gt;add_generation_prompt&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;True&lt;/span&gt;
)
&lt;span class="pl-s1"&gt;response&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;generate&lt;/span&gt;(
    &lt;span class="pl-s1"&gt;model&lt;/span&gt;, &lt;span class="pl-s1"&gt;tokenizer&lt;/span&gt;,
    &lt;span class="pl-s1"&gt;prompt&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-s1"&gt;prompt&lt;/span&gt;,
    &lt;span class="pl-s1"&gt;verbose&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;True&lt;/span&gt;,
    &lt;span class="pl-s1"&gt;max_tokens&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;8192&lt;/span&gt;
)&lt;/pre&gt;
&lt;p&gt;The response started like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt;The user wants me to create a Space Invaders game using HTML, CSS, and JavaScript. I need to create a complete, functional game with the following features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Player spaceship that can move left/right and shoot&lt;/li&gt;
&lt;li&gt;Enemy invaders that move in formation and shoot back&lt;/li&gt;
&lt;li&gt;Score tracking&lt;/li&gt;
&lt;li&gt;Lives/health system&lt;/li&gt;
&lt;li&gt;Game over conditions [...]&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Followed by the HTML and this debugging output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Prompt: 14 tokens, 14.095 tokens-per-sec
Generation: 4193 tokens, 25.564 tokens-per-sec
Peak memory: 47.687 GB
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can see &lt;a href="https://gist.github.com/simonw/9f515c8e32fb791549aeb88304550893#file-space_invaders-txt-L61"&gt;the full transcript here&lt;/a&gt;, or view &lt;a href="https://github.com/simonw/tools/blob/9e04fd9895fae1aa9ac78b8e62d2833831fe0544/space-invaders-GLM-4.5-Air-3bit.html"&gt;the source on GitHub&lt;/a&gt;, or &lt;a href="https://tools.simonwillison.net/space-invaders-GLM-4.5-Air-3bit"&gt;try it out in your browser&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id="pelican"&gt;A pelican for good measure&lt;/h4&gt;

&lt;p&gt;I ran &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle/"&gt;my pelican benchmark&lt;/a&gt; against the full sized models &lt;a href="https://simonwillison.net/2025/Jul/28/glm-45/"&gt;yesterday&lt;/a&gt;, but I couldn't resist trying it against this smaller 3bit model. Here's what I got for &lt;code&gt;"Generate an SVG of a pelican riding a bicycle"&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://static.simonwillison.net/static/2025/glm-4.5-air-3b-pelican.png" alt="Blue background, pelican looks like a cloud with an orange bike, bicycle is recognizable as a bicycle if not quite the right geometry." /&gt;&lt;/p&gt;

&lt;p&gt;Here's the &lt;a href="https://gist.github.com/simonw/fe428f7cead72ad754f965a81117f5df"&gt;transcript for that&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In both cases the model used around 48GB of RAM at peak, leaving me with just 16GB for everything else - I had to quit quite a few apps in order to get the model to run but the speed was pretty good once it got going.&lt;/p&gt;

&lt;h4 id="local-coding-models"&gt;Local coding models are really good now&lt;/h4&gt;

&lt;p&gt;It's interesting how almost every model released in 2025 has specifically targeting coding. That focus has clearly been paying off: these coding models are getting &lt;em&gt;really good&lt;/em&gt; now.&lt;/p&gt;

&lt;p&gt;Two years ago when I &lt;a href="https://simonwillison.net/2023/Mar/11/llama/"&gt;first tried LLaMA&lt;/a&gt; I never &lt;em&gt;dreamed&lt;/em&gt; that the same laptop I was using then would one day be able to run models with capabilities as strong as what I'm seeing from GLM 4.5 Air - and Mistral 3.2 Small, and Gemma 3, and Qwen 3, and a host of other high quality models that have emerged over the past six months.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/space-invaders"&gt;space-invaders&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ivan-fioravanti"&gt;ivan-fioravanti&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/glm"&gt;glm&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="python"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="ai-assisted-programming"/><category term="uv"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="ai-in-china"/><category term="space-invaders"/><category term="ivan-fioravanti"/><category term="glm"/></entry><entry><title>GLM-4.5: Reasoning, Coding, and Agentic Abililties</title><link href="https://simonwillison.net/2025/Jul/28/glm-45/" rel="alternate"/><published>2025-07-28T16:56:42+00:00</published><updated>2025-07-28T16:56:42+00:00</updated><id>https://simonwillison.net/2025/Jul/28/glm-45/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://z.ai/blog/glm-4.5"&gt;GLM-4.5: Reasoning, Coding, and Agentic Abililties&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Another day, another significant new open weight model release from a Chinese frontier AI lab.&lt;/p&gt;
&lt;p&gt;This time it's Z.ai - who rebranded (at least in English) from &lt;a href="https://en.wikipedia.org/wiki/Zhipu_AI"&gt;Zhipu AI&lt;/a&gt; a few months ago. They just dropped &lt;a href="https://huggingface.co/zai-org/GLM-4.5-Base"&gt;GLM-4.5-Base&lt;/a&gt;, &lt;a href="https://huggingface.co/zai-org/GLM-4.5"&gt;GLM-4.5&lt;/a&gt; and &lt;a href="https://huggingface.co/zai-org/GLM-4.5-Air"&gt;GLM-4.5 Air&lt;/a&gt; on Hugging Face, all under an MIT license.&lt;/p&gt;
&lt;p&gt;These are MoE hybrid reasoning models with thinking and non-thinking modes, similar to Qwen 3. GLM-4.5 is 355 billion total parameters with 32 billion active, GLM-4.5-Air is 106 billion total parameters and 12 billion active.&lt;/p&gt;
&lt;p&gt;They started using MIT a few months ago for their &lt;a href="https://huggingface.co/collections/zai-org/glm-4-0414-67f3cbcb34dd9d252707cb2e"&gt;GLM-4-0414&lt;/a&gt; models - their older releases used a janky non-open-source custom license.&lt;/p&gt;
&lt;p&gt;Z.ai's own benchmarking (across 12 common benchmarks) ranked their GLM-4.5 3rd behind o3 and Grok-4 and just ahead of Claude Opus 4. They ranked GLM-4.5 Air 6th place just ahead of Claude 4 Sonnet. I haven't seen any independent benchmarks yet.&lt;/p&gt;
&lt;p&gt;The other models they included in their own benchmarks were o4-mini (high), Gemini 2.5 Pro, Qwen3-235B-Thinking-2507, DeepSeek-R1-0528, Kimi K2, GPT-4.1, DeepSeek-V3-0324. Notably absent: any of Meta's Llama models, or any of Mistral's. Did they deliberately only compare themselves to open weight models from other Chinese AI labs?&lt;/p&gt;
&lt;p&gt;Both models have a 128,000 context length and are trained for tool calling, which honestly feels like table stakes for any model released in 2025 at this point.&lt;/p&gt;
&lt;p&gt;It's interesting to see them use Claude Code to run their own coding benchmarks:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To assess GLM-4.5's agentic coding capabilities, we utilized Claude Code to evaluate performance against Claude-4-Sonnet, Kimi K2, and Qwen3-Coder across 52 coding tasks spanning frontend development, tool development, data analysis, testing, and algorithm implementation. [...] The empirical results demonstrate that GLM-4.5 achieves a 53.9% win rate against Kimi K2 and exhibits dominant performance over Qwen3-Coder with an 80.8% success rate. While GLM-4.5 shows competitive performance, further optimization opportunities remain when compared to Claude-4-Sonnet.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;They published the dataset for that benchmark as &lt;a href="https://huggingface.co/datasets/zai-org/CC-Bench-trajectories"&gt;zai-org/CC-Bench-trajectories&lt;/a&gt; on Hugging Face. I think they're using the word "trajectory" for what I would call a chat transcript.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Unlike DeepSeek-V3 and Kimi K2, we reduce the width (hidden dimension and number of routed experts) of the model while increasing the height (number of layers), as we found that deeper models exhibit better reasoning capacity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;They pre-trained on 15 trillion tokens, then an additional 7 trillion for code and reasoning:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Our base model undergoes several training stages. During pre-training, the model is first trained on 15T tokens of a general pre-training corpus, followed by 7T tokens of a code &amp;amp; reasoning corpus. After pre-training, we introduce additional stages to further enhance the model's performance on key downstream domains.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;They also open sourced their post-training reinforcement learning harness, which they've called &lt;strong&gt;slime&lt;/strong&gt;. That's available at &lt;a href="https://github.com/THUDM/slime"&gt;THUDM/slime&lt;/a&gt; on GitHub - THUDM is the Knowledge Engineer Group @ Tsinghua University, the University from which Zhipu AI spun out as an independent company.&lt;/p&gt;
&lt;p&gt;This time I ran my &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle/"&gt;pelican bechmark&lt;/a&gt; using the &lt;a href="https://chat.z.ai/"&gt;chat.z.ai&lt;/a&gt; chat interface, which offers free access (no account required) to both GLM 4.5 and GLM 4.5 Air. I had reasoning enabled for both.&lt;/p&gt;
&lt;p&gt;Here's what I got for "Generate an SVG of a pelican riding a bicycle" on &lt;a href="https://chat.z.ai/s/014a8c13-7b73-40e8-bbf9-6a94482caa2e"&gt;GLM 4.5&lt;/a&gt;. I like how the pelican has its wings on the handlebars:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Description by Claude Sonnet 4: This is a whimsical illustration of a white duck or goose riding a red bicycle. The bird has an orange beak and is positioned on the bike seat, with its orange webbed feet gripping what appears to be chopsticks or utensils near the handlebars. The bicycle has a simple red frame with two wheels, and there are motion lines behind it suggesting movement. The background is a soft blue-gray color, giving the image a clean, minimalist cartoon style. The overall design has a playful, humorous quality to it." src="https://static.simonwillison.net/static/2025/glm-4.5-pelican.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;And &lt;a href="https://chat.z.ai/s/e772675c-3445-4cff-903c-6faa3d6b9524"&gt;GLM 4.5 Air&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Description by Claude Sonnet 4: This image shows a cute, minimalist illustration of a snowman riding a bicycle. The snowman has a simple design with a round white body, small black dot for an eye, and an orange rectangular nose (likely representing a carrot). The snowman appears to be in motion on a black bicycle with two wheels, with small orange arrows near the pedals suggesting movement. There are curved lines on either side of the image indicating motion or wind. The overall style is clean and whimsical, using a limited color palette of white, black, orange, and gray against a light background." src="https://static.simonwillison.net/static/2025/glm-4.5-air-pelican.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Ivan Fioravanti &lt;a href="https://x.com/ivanfioravanti/status/1949854575902523399"&gt;shared a video&lt;/a&gt; of the &lt;a href="https://huggingface.co/mlx-community/GLM-4.5-Air-4bit"&gt;mlx-community/GLM-4.5-Air-4bit&lt;/a&gt; quantized model running on a M4 Mac with 128GB of RAM, and it looks like a very strong contender for a local model that can write useful code. The cheapest 128GB Mac Studio costs around $3,500 right now, so genuinely great open weight coding models are creeping closer to being affordable on consumer machines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Ivan released a 3 bit quantized version of GLM-4.5 Air which runs using 48GB of RAM on my laptop. I tried it and was &lt;em&gt;really&lt;/em&gt; impressed, see &lt;a href="https://simonwillison.net/2025/Jul/29/space-invaders/"&gt;My 2.5 year old laptop can write Space Invaders in JavaScript now&lt;/a&gt;.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ivan-fioravanti"&gt;ivan-fioravanti&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/glm"&gt;glm&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="llm-reasoning"/><category term="llm-release"/><category term="ai-in-china"/><category term="ivan-fioravanti"/><category term="glm"/></entry><entry><title>moonshotai/Kimi-K2-Instruct</title><link href="https://simonwillison.net/2025/Jul/11/kimi-k2/" rel="alternate"/><published>2025-07-11T18:33:54+00:00</published><updated>2025-07-11T18:33:54+00:00</updated><id>https://simonwillison.net/2025/Jul/11/kimi-k2/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/moonshotai/Kimi-K2-Instruct"&gt;moonshotai/Kimi-K2-Instruct&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Colossal new open weights model release today from &lt;a href="https://en.wikipedia.org/wiki/Moonshot_AI"&gt;Moonshot AI&lt;/a&gt;, a two year old Chinese AI lab with a name inspired by Pink Floyd’s album The Dark Side of the Moon.&lt;/p&gt;
&lt;p&gt;My &lt;a href="https://tools.simonwillison.net/huggingface-storage"&gt;HuggingFace storage calculator&lt;/a&gt; says the repository is 958.52 GB. It's a mixture-of-experts model with "32 billion activated parameters and 1 trillion total parameters", trained using the Muon optimizer as described in Moonshot's joint paper with UCLA &lt;a href="https://arxiv.org/abs/2502.16982"&gt;Muon is Scalable for LLM Training&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think this may be the largest ever open weights model? DeepSeek v3 is 671B.&lt;/p&gt;
&lt;p&gt;I created &lt;a href="https://platform.moonshot.ai/console/api-keys"&gt;an API key for Moonshot&lt;/a&gt;, added some dollars and ran a prompt against it using my LLM tool. First I added this to the &lt;a href="https://llm.datasette.io/en/stable/other-models.html#openai-compatible-models"&gt;extra-openai-models.yaml file&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- model_id: kimi-k2
  model_name: kimi-k2-0711-preview
  api_base: https://api.moonshot.ai/v1
  api_key_name: moonshot
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I set the API key:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm keys set moonshot
# Paste key here
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And ran a prompt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m kimi-k2 "Generate an SVG of a pelican riding a bicycle" \
  -o max_tokens 2000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(The default max tokens setting was too short.)&lt;/p&gt;
&lt;p&gt;&lt;img alt="Description by Claude Sonnet 4: Simple line drawing of a white rubber duck with orange beak sitting on a red bicycle with spoked wheels" src="https://static.simonwillison.net/static/2025/kimi-k2-pelican.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is pretty good! The spokes are a nice touch. &lt;a href="https://gist.github.com/simonw/39aba6a1d4895ad7516bffe9485031db"&gt;Full transcript here&lt;/a&gt;.&lt;/p&gt;
&lt;p id="kimi-license"&gt;This one is open weights but not open source: they're using a &lt;a href="https://github.com/moonshotai/Kimi-K2/blob/main/LICENSE"&gt;modified MIT license&lt;/a&gt; with this non-OSI-compliant section tagged on at the end:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Our only modification part is that, if the Software (or any derivative works
thereof) is used for any of your commercial products or services that have
more than 100 million monthly active users, or more than 20 million US dollars
(or equivalent in other currencies) in monthly revenue, you shall prominently
display "Kimi K2" on the user interface of such product or service.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: MLX developer &lt;a href="https://x.com/awnihannun/status/1943723599971443134"&gt;Awni Hannun reports&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The new Kimi K2 1T model (4-bit quant) runs on 2 512GB M3 Ultras with mlx-lm and mx.distributed.&lt;/p&gt;
&lt;p&gt;1 trillion params, at a speed that's actually quite usable&lt;/p&gt;
&lt;/blockquote&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=44533403"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/moonshot"&gt;moonshot&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/kimi"&gt;kimi&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="llm"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="llm-release"/><category term="ai-in-china"/><category term="moonshot"/><category term="kimi"/></entry><entry><title>Introducing Gemma 3n: The developer guide</title><link href="https://simonwillison.net/2025/Jun/26/gemma-3n/" rel="alternate"/><published>2025-06-26T21:08:36+00:00</published><updated>2025-06-26T21:08:36+00:00</updated><id>https://simonwillison.net/2025/Jun/26/gemma-3n/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://developers.googleblog.com/en/introducing-gemma-3n-developer-guide/"&gt;Introducing Gemma 3n: The developer guide&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Extremely consequential new open weights model release from Google today:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multimodal by design:&lt;/strong&gt; Gemma 3n natively supports image, audio, video, and text inputs and text outputs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Optimized for on-device:&lt;/strong&gt; Engineered with a focus on efficiency, Gemma 3n models are available in two sizes based on &lt;a href="https://developers.googleblog.com/en/introducing-gemma-3n-developer-guide/#per-layer-embeddings-(ple):-unlocking-more-memory-efficiency"&gt;&lt;strong&gt;effective&lt;/strong&gt;&lt;/a&gt; parameters: E2B and E4B. While their raw parameter count is 5B and 8B respectively, architectural innovations allow them to run with a memory footprint comparable to traditional 2B and 4B models, operating with as little as 2GB (E2B) and 3GB (E4B) of memory.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is &lt;strong&gt;very&lt;/strong&gt; exciting: a 2B and 4B model optimized for end-user devices which accepts text, images &lt;em&gt;and&lt;/em&gt; audio as inputs!&lt;/p&gt;
&lt;p&gt;Gemma 3n is also the most comprehensive day one launch I've seen for any model: Google partnered with "AMD, Axolotl, Docker, Hugging Face, llama.cpp, LMStudio, MLX, NVIDIA, Ollama, RedHat, SGLang, Unsloth, and vLLM" so there are dozens of ways to try this out right now.&lt;/p&gt;
&lt;p&gt;So far I've run two variants on my Mac laptop. Ollama offer &lt;a href="https://ollama.com/library/gemma3n"&gt;a 7.5GB version&lt;/a&gt; (full tag &lt;code&gt;gemma3n:e4b-it-q4_K_M0&lt;/code&gt;) of the 4B model, which I ran like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull gemma3n
llm install llm-ollama
llm -m gemma3n:latest "Generate an SVG of a pelican riding a bicycle"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It drew me this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The pelican looks a bit like a grey pig. It is floating above a bicycle that looks more like a rail cart." src="https://static.simonwillison.net/static/2025/gemma3n-ollama.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;The Ollama version doesn't appear to support image or audio input yet.&lt;/p&gt;
&lt;p&gt;... but the &lt;a href="https://github.com/Blaizzy/mlx-vlm"&gt;mlx-vlm&lt;/a&gt; version does!&lt;/p&gt;
&lt;p&gt;First I tried that on &lt;a href="https://static.simonwillison.net/static/2025/pelican-joke-request.wav"&gt;this WAV file&lt;/a&gt; like so (using a recipe adapted from &lt;a href="https://www.youtube.com/watch?v=8-8R2UvUBrc"&gt;Prince Canuma's video&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run --with mlx-vlm mlx_vlm.generate \
  --model gg-hf-gm/gemma-3n-E4B-it \
  --max-tokens 100 \
  --temperature 0.7 \
  --prompt "Transcribe the following speech segment in English:" \
  --audio pelican-joke-request.wav
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That downloaded a 15.74 GB bfloat16 version of the model and output the following correct transcription:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tell me a joke about a pelican.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then I had it draw me a pelican for good measure:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run --with mlx-vlm mlx_vlm.generate \
  --model gg-hf-gm/gemma-3n-E4B-it \
  --max-tokens 100 \
  --temperature 0.7 \
  --prompt "Generate an SVG of a pelican riding a bicycle"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I quite like this one:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The bicycle is a sin wave, but you can make out which bits are the frame and the wheels. The pelican is white with a black triangular bill. It's a much better attempt than the Ollama one." src="https://static.simonwillison.net/static/2025/gemma3n-mlx-vlm.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;It's interesting to see such a striking visual difference between those 7.5GB and 15GB model quantizations.&lt;/p&gt;
&lt;p&gt;Finally, I had it describe the image it had just created:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uv run --with mlx-vlm mlx_vlm.generate \
  --model gg-hf-gm/gemma-3n-E4B-it \
  --max-tokens 1000 \
  --prompt "Describe image" \
  --image gemma3n-mlx-vlm.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's what I got back - it thought this was a chemical diagram!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The image is a cartoon-style illustration depicting a molecular structure against a light blue background. The structure is composed of several differently colored and shaped elements connected by curved black lines. &lt;/p&gt;
&lt;p&gt;Here's a breakdown of the elements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Large Black Circles:&lt;/strong&gt; There are two large, solid black circles, likely representing larger molecules or components.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cream-Colored Oval:&lt;/strong&gt; A prominent cream-colored oval shape is centrally located and connected to other elements. It has a smaller, darker cream-colored sphere attached to its left side.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Red Oval:&lt;/strong&gt; A smaller, solid red oval is positioned near one of the black circles and connected to the cream-colored oval.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Black Lines:&lt;/strong&gt; These lines act as bonds, connecting the various molecular components. They are curved and dynamic, suggesting movement or interaction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Triangular Shape:&lt;/strong&gt; A small black triangle is attached to the smaller cream-colored sphere.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Letter "I":&lt;/strong&gt; The letter "I" appears twice, likely labeling specific parts of the molecule. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The overall impression is of a simplified representation of a biological molecule, possibly a protein or a complex organic compound. The use of different colors helps to distinguish the various components within the structure.&lt;/p&gt;
&lt;/blockquote&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/audio"&gt;audio&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemma"&gt;gemma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prince-canuma"&gt;prince-canuma&lt;/a&gt;&lt;/p&gt;



</summary><category term="audio"/><category term="google"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="vision-llms"/><category term="mlx"/><category term="ollama"/><category term="pelican-riding-a-bicycle"/><category term="gemma"/><category term="llm-release"/><category term="prince-canuma"/></entry><entry><title>Comma v0.1 1T and 2T - 7B LLMs trained on openly licensed text</title><link href="https://simonwillison.net/2025/Jun/7/comma/" rel="alternate"/><published>2025-06-07T23:59:27+00:00</published><updated>2025-06-07T23:59:27+00:00</updated><id>https://simonwillison.net/2025/Jun/7/comma/</id><summary type="html">
    &lt;p&gt;It's been a long time coming, but we finally have some promising LLMs to try out which are trained entirely on openly licensed text!&lt;/p&gt;
&lt;p&gt;EleutherAI released &lt;a href="https://arxiv.org/abs/2101.00027"&gt;the Pile&lt;/a&gt; four and a half years ago: "an 800GB dataset of diverse text for language modeling". It's been used as the basis for many LLMs since then, but much of the data in it came from &lt;a href="https://commoncrawl.org/"&gt;Common Crawl&lt;/a&gt; - a crawl of the public web which mostly ignored the licenses of the data it was collecting.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://huggingface.co/blog/stellaathena/common-pile"&gt;The Common Pile v0.1&lt;/a&gt; is EleutherAI's successor to the original Pile, in collaboration with a large group of other organizations with whom they have been "meticulously curating a 8 TB corpus of openly licensed and public domain text for training large language models".&lt;/p&gt;
&lt;p&gt;The dataset is exciting, but on top of that they've released two new LLMs that have been trained on it: Comma v0.1 1T and 2T, both with 7 billion parameters, the first trained on 1 trillion tokens and the second on 2 trillion tokens.&lt;/p&gt;
&lt;p&gt;These are available on Hugging Face as &lt;a href="https://huggingface.co/common-pile/comma-v0.1-1t"&gt;common-pile/comma-v0.1-1t&lt;/a&gt; and &lt;a href="https://huggingface.co/common-pile/comma-v0.1-2t"&gt;common-pile/comma-v0.1-2t&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;EleutherAI claim that these new models perform "comparably to leading models trained in the same regime on unlicensed data". I decided to try them out myself.&lt;/p&gt;
&lt;p&gt;The models are currently only available as &lt;code&gt;.safetensors&lt;/code&gt; files, which I've found difficult to run on macOS in the past. I decided to see if I could convert them to &lt;a href="https://github.com/ml-explore/mlx"&gt;MLX&lt;/a&gt; format which I know how to run on my Mac.&lt;/p&gt;
&lt;p&gt;MLX is still a very new format, but Claude 4 Sonnet has a training cutoff date of March 2025 so I crossed my fingers and hoped it would be able to help me out. &lt;a href="https://claude.ai/share/379951f0-4fb2-4b70-b6f9-f8a3afae1e33"&gt;It did exactly that!&lt;/a&gt; I ran the following command to convert the 2T model to run using MLX:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;uv run --python 3.12 \
  --with mlx-lm \
  python -m mlx_lm convert \
    --hf-path common-pile/comma-v0.1-2t \
    --mlx-path ./comma-v0.1-2t-mlx&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I uploaded the converted model to Hugging Face as &lt;a href="https://huggingface.co/simonw/comma-v0.1-2t-mlx"&gt;simonw/comma-v0.1-2t-mlx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now that it's on the Hub here's how to try it out (using &lt;code&gt;uv run&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;uv run --python 3.12 \
  --with mlx-lm \
  mlx_lm.generate \
    --model simonw/comma-v0.1-2t-mlx \
    --prompt &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Facts about pelicans:&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The first time you run this it will download 13GB of files to &lt;code&gt;~/.cache/huggingface/hub/models--simonw--comma-v0.1-2t-mlx&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here's what I got back:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;1. They are the largest of the water birds. 2. They are found in all parts of the world. 3. They are very good swimmers. 4. They are very good divers. 5. They are very good flyers. 6. They are very good hunters. 7. They are very good eaters. 8. They are very good parents. 9. They are very good friends. 10.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The big limitation of this model right now is that it's a raw base model - it hasn't been instruction-tuned or set up for chat.&lt;/p&gt;
&lt;p&gt;This means you have to prefix-prompt it, like in the GPT-3 days. You need to give it a sentence for it to complete.&lt;/p&gt;
&lt;p&gt;This makes it a lot harder to evaluate than the instruction-tuned models that I've become used to over the past few years!&lt;/p&gt;
&lt;p&gt;I'm hoping someone releases a chat-tuned version of this model soon. The challenge there will be keeping to the openly licensed training data, since most of the fine-tuning datasets out there for this are themselves derived from models that were trained on unlicensed data.&lt;/p&gt;

&lt;p&gt;Sadly it didn't do too well on my &lt;a href="https://simonwillison.net/2025/Jun/6/six-months-in-llms/#ai-worlds-fair-2025-02.jpeg"&gt;pelican on a bicycle&lt;/a&gt; benchmark:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;uv run --python 3.12 \
  --with mlx-lm \
  mlx_lm.generate \
    --model simonw/comma-v0.1-2t-mlx \
    --prompt &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;An SVG of a pelican riding a bicycle: &amp;lt;svg&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt; --max-tokens 2000&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The output started like this and looped indefinitely:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 100"&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;&amp;lt;path d="M0 0h100v100H0z" fill="none"/&amp;gt;...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/training-data"&gt;training-data&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-ethics"&gt;ai-ethics&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="training-data"/><category term="mlx"/><category term="ai-ethics"/><category term="llm-release"/></entry><entry><title>Run Your Own AI</title><link href="https://simonwillison.net/2025/Jun/3/run-your-own-ai/" rel="alternate"/><published>2025-06-03T17:19:38+00:00</published><updated>2025-06-03T17:19:38+00:00</updated><id>https://simonwillison.net/2025/Jun/3/run-your-own-ai/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://anthonylewis.com/2025/06/01/run-your-own-ai/"&gt;Run Your Own AI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Anthony Lewis published this neat, concise tutorial on using my &lt;a href="https://llm.datasette.io/"&gt;LLM&lt;/a&gt; tool to run local models on your own machine, using &lt;a href="https://simonwillison.net/2025/Feb/15/llm-mlx/"&gt;llm-mlx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An under-appreciated way to contribute to open source projects is to publish unofficial guides like this one. Always brightens my day when something like this shows up.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://bsky.app/profile/anthonyllewis.bsky.social/post/3lqnypjsrrk2f"&gt;@anthonyllewis.bsky.social&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;&lt;/p&gt;



</summary><category term="open-source"/><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="llm"/><category term="mlx"/></entry><entry><title>deepseek-ai/DeepSeek-R1-0528</title><link href="https://simonwillison.net/2025/May/31/deepseek-aideepseek-r1-0528/" rel="alternate"/><published>2025-05-31T21:18:32+00:00</published><updated>2025-05-31T21:18:32+00:00</updated><id>https://simonwillison.net/2025/May/31/deepseek-aideepseek-r1-0528/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-0528"&gt;deepseek-ai/DeepSeek-R1-0528&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Sadly the trend for &lt;em&gt;terrible naming&lt;/em&gt; of models has infested the Chinese AI labs as well.&lt;/p&gt;
&lt;p&gt;DeepSeek-R1-0528 is a brand new and much improved open weights reasoning model from DeepSeek, a major step up from the DeepSeek R1 they released &lt;a href="https://simonwillison.net/2025/Jan/20/deepseek-r1/"&gt;back in January&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the latest update, DeepSeek R1 has significantly improved its depth of reasoning and inference capabilities by [...] Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. [...]&lt;/p&gt;
&lt;p&gt;Beyond its improved reasoning capabilities, this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The new R1 comes in two sizes: a 685B model called &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-0528"&gt;deepseek-ai/DeepSeek-R1-0528&lt;/a&gt;  (the previous R1 was 671B) and an 8B variant distilled from Qwen 3 called &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B"&gt;deepseek-ai/DeepSeek-R1-0528-Qwen3-8B&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The January release of R1 had a much larger collection of distilled models: four based on Qwen 2.5 (14B, 32B, Math 1.5B and Math 7B) and 2 based on Llama 3 (Llama-3.1 8B and Llama 3.3 70B Instruct).&lt;/p&gt;
&lt;p&gt;No Llama model at all this time. I wonder if that's because Qwen 3 is &lt;em&gt;really good&lt;/em&gt; and Apache 2 licensed, while Llama continues to stick with their &lt;a href="https://simonwillison.net/2025/Apr/20/janky-license/"&gt;janky license terms&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Further adding to the confusion, Ollama have mixed the two new models into their existing &lt;a href="https://ollama.com/library/deepseek-r1/tags"&gt;deepseek-r1&lt;/a&gt; label. Last week running &lt;code&gt;ollama pull deepseek-r1:8B&lt;/code&gt; from Ollama would get you &lt;code&gt;DeepSeek-R1-Distill-Llama-8B&lt;/code&gt; (&lt;a href="https://web.archive.org/web/20250514072051/https://ollama.com/library/deepseek-r1:8b"&gt;Internet Archive link&lt;/a&gt;), today that same command gets you &lt;a href="https://ollama.com/library/deepseek-r1:8b"&gt;DeepSeek-R1-0528-Qwen3-8B&lt;/a&gt;, a completely different base model.&lt;/p&gt;
&lt;p&gt;If this bothers you as much as it bothers me, thankfully you can use the more explicit tag &lt;a href="https://ollama.com/library/deepseek-r1:8b-0528-qwen3-q8_0"&gt;deepseek-r1:8b-0528-qwen3-q8_0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update&lt;/strong&gt;: This is a great illustration of how confusing these names are! Ollama's &lt;code&gt;deepseek-r1:8B&lt;/code&gt; alias actually points to &lt;a href="https://ollama.com/library/deepseek-r1:8b-0528-qwen3-q4_K_M"&gt;deepseek-r1:8b-0528-qwen3-q4_K_M&lt;/a&gt;, a 5.2GB model. I pulled the larger &lt;code&gt;q8_0&lt;/code&gt; one.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I ran it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull deepseek-r1:8b-0528-qwen3-q8_0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It fetched 8.9GB of model weights, then I had it draw me a pelican.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-ollama
llm -m deepseek-r1:8b-0528-qwen3-q8_0 \
  "Generate an SVG of a pelican riding a bicycle"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since the “reasoning” traces of these models are almost always the most interesting part, I’ll quote &lt;a href="https://gist.github.com/simonw/b8aea7c0279175166ebd46160d290d20"&gt;the response&lt;/a&gt; here in full:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt;&lt;br /&gt;
We are going to create an SVG that depicts a pelican riding a bicycle.
Steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create the basic structure of an SVG with width and height set appropriately (e.g., 400x200).&lt;/li&gt;
&lt;li&gt;Draw a pelican: We'll break it down into parts - body, beak, eye, feet, wings, etc.&lt;/li&gt;
&lt;li&gt;Draw a bicycle: We can represent it as two circles for wheels, a rectangle for the frame, and some other details.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let's design the SVG with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The pelican will be facing to the right (positive x-axis) so that it is riding the bike from left to right.&lt;/li&gt;
&lt;li&gt;The bicycle will have two wheels and a simple frame in front of the pelican.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We'll use absolute positioning for each part. Let's assume we set up coordinates such that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The top-left of the SVG is (0,0), and we want the scene to be drawn from left to right.&lt;/li&gt;
&lt;li&gt;The pelican will be positioned at (50, 120) with a body length of about 30 units.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We'll use simple shapes for the pelican:&lt;/p&gt;
&lt;p&gt;Body: An ellipse or rounded rectangle. Let's do an ellipse for the body.
Beak: A triangle pointing to the right.
Head: Another ellipse but smaller and positioned in front of the body.
Wings: Two triangles (one above each other, one slightly behind) that are upside down.&lt;/p&gt;
&lt;p&gt;Bicycle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wheels: two circles at fixed positions relative to the frame.&lt;/li&gt;
&lt;li&gt;Frame: a rectangle with some details for handlebars and seat.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since this is a fun illustration, we'll keep it simple but recognizable.&lt;/p&gt;
&lt;p&gt;Let's code accordingly.&lt;br /&gt;
&lt;code&gt;&amp;lt;/think&amp;gt;&lt;/code&gt;&lt;br /&gt;
Here’s an SVG of a pelican riding a bicycle. This example uses basic shapes to create a stylized version:&lt;/p&gt;
&lt;div class="highlight highlight-text-xml-svg"&gt;&lt;pre&gt;&amp;lt;&lt;span class="pl-ent"&gt;svg&lt;/span&gt; &lt;span class="pl-e"&gt;xmlns&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;http://www.w3.org/2000/svg&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;viewBox&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;0 0 400 200&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;&amp;gt;
  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Pelican body &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;ellipse&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;150&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;150&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;rx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;80&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;ry&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;60&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#FFD700&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Pelican head (larger for comedic effect) &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;circle&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;90&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;120&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;r&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;45&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#FFA3CE&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Pelican beak &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;polygon&lt;/span&gt; &lt;span class="pl-e"&gt;points&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;80,110 60,120 80,130 70,140 60,150&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#FFC233&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Pelican eye &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;circle&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;95&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;115&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;r&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;3&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#fff&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Bicycle wheels &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;ellipse&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;380&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;140&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;rx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;25&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;ry&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;60&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;transform&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;rotate(90 380 140)&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;black&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
  &amp;lt;&lt;span class="pl-ent"&gt;ellipse&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;380&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;70&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;rx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;25&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;ry&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;60&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;transform&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;rotate(90 380 70)&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;black&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Bicycle frame &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;path&lt;/span&gt; &lt;span class="pl-e"&gt;d&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;M 15,40 L 15,140 H 370 L 370,140 V 40 Z&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;gray&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke-width&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;6&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;none&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Handlebars and seat (stylized) &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;path&lt;/span&gt; &lt;span class="pl-e"&gt;d&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;M 280,40 C 290,35 300,30 310,40 C 320,50 330,60 310,70 L 310,70 Q 290,50 280,40&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;none&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;gray&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Pedals &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;circle&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;340&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;70&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;r&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;15&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#3366CC&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
  &amp;lt;&lt;span class="pl-ent"&gt;polygon&lt;/span&gt; &lt;span class="pl-e"&gt;points&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;340,65 330,45 350,45&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#F29E3D&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &amp;lt;&lt;span class="pl-ent"&gt;circle&lt;/span&gt; &lt;span class="pl-e"&gt;cx&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;340&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;cy&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;140&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;r&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;15&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#3366CC&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
  &amp;lt;&lt;span class="pl-ent"&gt;polygon&lt;/span&gt; &lt;span class="pl-e"&gt;points&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;340,135 330,115 350,115&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#F29E3D&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;

  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Neck connecting head to body &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;path&lt;/span&gt; &lt;span class="pl-e"&gt;d&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;M 80,120 C 70,160 100,140 150,120&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#FFA3CE&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke-width&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;8&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
&amp;lt;/&lt;span class="pl-ent"&gt;svg&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;Explanation:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pelican Body&lt;/strong&gt;: A large yellow ellipse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head&lt;/strong&gt;: A pink circle with a prominent beak (yellow-orange triangle).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bicycle&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Wheels are black ellipses rotated vertically to simulate spokes.&lt;/li&gt;
&lt;li&gt;The frame is a gray rectangle extending from the pelican’s back to the right side of the SVG.&lt;/li&gt;
&lt;li&gt;Handlebars and seat are simplified curves in gray.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This creates a comical scene with the pelican riding forward. You can adjust colors, sizes, or positions by modifying &lt;code&gt;cx&lt;/code&gt;, &lt;code&gt;cy&lt;/code&gt;, &lt;code&gt;rx&lt;/code&gt;, &lt;code&gt;ry&lt;/code&gt; attributes and fill/stroke values.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Love the thought process, and the explanation! The actual rendered SVG does leave a lot to be desired though:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A pink circle ovenrlaps a yellow oval, with a grey thick lined rectangle cutting thorough both. Two identical blue circles on the right have orange triangular elements and black ovals, a fair distance from the bit that might represent the pelican - it's very hard to tell." src="https://static.simonwillison.net/static/2025/deepseek-qwen-8b-pelican.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;To be fair, this is just using the ~8GB Qwen3 Q8_0 model on my laptop. I don't have the hardware to run the full sized R1 but it's available as &lt;code&gt;deepseek-reasoner&lt;/code&gt; through DeepSeek's API, so I tried it there using the &lt;a href="https://github.com/rumisle/llm-deepseek"&gt;llm-deepseek plugin&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-deepseek
llm -m deepseek-reasoner \
  "Generate an SVG of a pelican riding a bicycle"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This one came out &lt;a href="https://gist.github.com/simonw/d8765ea8413592b074ded45cbc585c54"&gt;a lot better&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A much better pelican on a bicycle - you can tell it's a bicycle and you can tell that it's a white bird with a long orange beak riding it, albeit it's not clearly a pelican and the bird is lying beneath the seat." src="https://static.simonwillison.net/static/2025/deepseek-r1-better-pelican.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Meanwhile, on Reddit, u/adrgrondin got &lt;a href="https://www.reddit.com/r/LocalLLM/comments/1kz7qu1/deepseekr10528qwen38b_on_iphone_16_pro/"&gt;DeepSeek-R1-0528-Qwen3-8B running on an iPhone 16 Pro&lt;/a&gt; using MLX:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It runs at a decent speed for the size thanks to MLX, pretty impressive. But not really usable in my opinion, the model is thinking for too long, and the phone gets really hot.&lt;/p&gt;
&lt;/blockquote&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/deepseek"&gt;deepseek&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="llm"/><category term="mlx"/><category term="ollama"/><category term="llm-reasoning"/><category term="deepseek"/><category term="llm-release"/><category term="ai-in-china"/></entry><entry><title>qwen2.5vl in Ollama</title><link href="https://simonwillison.net/2025/May/18/qwen25vl-in-ollama/" rel="alternate"/><published>2025-05-18T12:31:15+00:00</published><updated>2025-05-18T12:31:15+00:00</updated><id>https://simonwillison.net/2025/May/18/qwen25vl-in-ollama/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://ollama.com/library/qwen2.5vl"&gt;qwen2.5vl in Ollama&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Ollama announced a complete overhaul of their vision support the other day. Here's the first new model they've shipped since then - a packaged version of &lt;a href="https://github.com/QwenLM/Qwen2.5-VL"&gt;Qwen 2.5 VL&lt;/a&gt; which was first released &lt;a href="https://qwenlm.github.io/blog/qwen2.5-vl/"&gt;on January 26th 2025&lt;/a&gt;. Here are my &lt;a href="https://simonwillison.net/2025/Jan/27/qwen25-vl-qwen25-vl-qwen25-vl/"&gt;notes from that release&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I upgraded Ollama (it auto-updates so I just had to restart it from the tray icon) and ran this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull qwen2.5vl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This downloaded a 6GB model file. I tried it out against my &lt;a href="https://static.simonwillison.net/static/2025/cleo-sand.jpg"&gt;photo of Cleo rolling on the beach&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -a https://static.simonwillison.net/static/2025/cleo-sand.jpg \
  'describe this image' -m qwen2.5vl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And got a pretty good result:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The image shows a dog lying on its back on a sandy beach. The dog appears to be a medium to large breed with a dark coat, possibly black or dark brown. It is wearing a red collar or harness around its chest. The dog's legs are spread out, and its belly is exposed, suggesting it might be rolling around or playing in the sand. The sand is light-colored and appears to be dry, with some small footprints and marks visible around the dog. The lighting in the image suggests it is taken during the daytime, with the sun casting a shadow of the dog to the left side of the image. The overall scene gives a relaxed and playful impression, typical of a dog enjoying time outdoors on a beach.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Qwen 2.5 VL has a strong reputation for OCR, so I tried it on &lt;a href="https://simonwillison.net/2025/May/17/pycon-poster/#datasette-poster"&gt;my poster&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -a https://static.simonwillison.net/static/2025/poster.jpg \
  'convert to markdown' -m qwen2.5vl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The result that came back:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It looks like the image you provided is a jumbled and distorted text, making it difficult to interpret. If you have a specific question or need help with a particular topic, please feel free to ask, and I'll do my best to assist you!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm not sure what went wrong here. My best guess is that the maximum resolution the model can handle is too small to make out the text, or maybe Ollama resized the image to the point of illegibility before handing it to the model?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I think this may be &lt;a href="https://github.com/simonw/llm/issues/1046"&gt;a bug&lt;/a&gt; relating to URL handling in LLM/llm-ollama. I tried downloading the file first:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget https://static.simonwillison.net/static/2025/poster.jpg
llm -m qwen2.5vl 'extract text' -a poster.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This time it did a lot better. The results weren't perfect though - &lt;a href="https://gist.github.com/simonw/2b46e932a16c92e673ea09dfc0186ec2#response"&gt;it ended up stuck in a loop&lt;/a&gt; outputting the same code example dozens of times.&lt;/p&gt;
&lt;p&gt;I tried with a different prompt - "extract text" - and it got confused by the three column layout, misread Datasette as "Datasetette" and missed some of the text. Here's &lt;a href="https://gist.github.com/simonw/3ececa5f5ff109a81bc6893be06f00b1#response"&gt;that result&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These experiments used &lt;code&gt;qwen2.5vl:7b&lt;/code&gt; (6GB) - I expect the results would be better with the larger &lt;code&gt;qwen2.5vl:32b&lt;/code&gt; (21GB) and &lt;code&gt;qwen2.5vl:72b&lt;/code&gt; (71GB) models.&lt;/p&gt;
&lt;p&gt;Fred Jonsson &lt;a href="https://twitter.com/enginoid/status/1924092556079436086"&gt;reported a better result&lt;/a&gt; using the MLX model via LM studio (~9GB model running in 8bit - I think that's &lt;a href="https://huggingface.co/mlx-community/Qwen2.5-VL-7B-Instruct-8bit"&gt;mlx-community/Qwen2.5-VL-7B-Instruct-8bit&lt;/a&gt;). His &lt;a href="https://gist.github.com/enginoid/5c91c920124d4a2e0ab253df769e35fa"&gt;full output is here&lt;/a&gt; - looks almost exactly right to me.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ocr"&gt;ocr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="ocr"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="llm"/><category term="vision-llms"/><category term="qwen"/><category term="mlx"/><category term="ollama"/><category term="ai-in-china"/></entry><entry><title>Qwen3-8B</title><link href="https://simonwillison.net/2025/May/2/qwen3-8b/" rel="alternate"/><published>2025-05-02T23:41:52+00:00</published><updated>2025-05-02T23:41:52+00:00</updated><id>https://simonwillison.net/2025/May/2/qwen3-8b/</id><summary type="html">
    &lt;p&gt;Having tried a few of the &lt;a href="https://simonwillison.net/2025/Apr/29/qwen-3/"&gt;Qwen 3 models&lt;/a&gt; now my favorite is a bit of a surprise to me: I'm really enjoying &lt;a href="https://huggingface.co/Qwen/Qwen3-8B"&gt;Qwen3-8B&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I've been running prompts through the MLX 4bit quantized version, &lt;a href="https://huggingface.co/mlx-community/Qwen3-8B-4bit"&gt;mlx-community/Qwen3-8B-4bit&lt;/a&gt;. I'm using &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt; like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-mlx
llm mlx download-model mlx-community/Qwen3-8B-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This pulls 4.3GB of data and saves it to &lt;code&gt;~/.cache/huggingface/hub/models--mlx-community--Qwen3-8B-4bit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I assigned it a default alias:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm aliases set q3 mlx-community/Qwen3-8B-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also added a default option for that model - this saves me from adding &lt;code&gt;-o unlimited 1&lt;/code&gt; to every prompt which disables the default output token limit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm models options set q3 unlimited 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now I can run prompts:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m q3 'brainstorm questions I can ask my friend who I think is secretly from Atlantis that will not tip her off to my suspicions'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Qwen3 is a "reasoning" model, so it starts each prompt with a &lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt; block containing its chain of thought. Reading these is always &lt;em&gt;really fun&lt;/em&gt;. Here's the full response I got for &lt;a href="https://gist.github.com/simonw/52a883eb4709de66c6bfe9bb3b0f3ee0"&gt;the above question&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'm finding Qwen3-8B to be surprisingly capable for useful things too. It can &lt;a href="https://gist.github.com/simonw/ab414f01a28e050b8419b4152a4016d1"&gt;summarize short articles&lt;/a&gt;. It can &lt;a href="https://gist.github.com/simonw/db129dddb76e5ba8f97794a794ae626d#response-1"&gt;write simple SQL queries&lt;/a&gt; given a question and a schema. It can &lt;a href="https://gist.github.com/simonw/54f040ae2f2ca3b83cdc1b2e691936ab"&gt;figure out what a simple web app does&lt;/a&gt; by reading the HTML and JavaScript. It can &lt;a href="https://gist.github.com/simonw/ac4082df0dcde87d5845586804fb80c9"&gt;write Python code&lt;/a&gt; to meet a paragraph long spec - for that one it "reasoned" for an unreasonably long time but it did eventually get to a useful answer.&lt;/p&gt;
&lt;p&gt;All this while consuming between 4 and 5GB of memory, depending on the length of the prompt.&lt;/p&gt;
&lt;p&gt;I think it's pretty extraordinary that a few GBs of floating point numbers can usefully achieve these various tasks, especially using so little memory that it's not an imposition on the rest of the things I want to run on my laptop at the same time.&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/models"&gt;models&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="models"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llm"/><category term="qwen"/><category term="mlx"/><category term="llm-reasoning"/><category term="ai-in-china"/></entry><entry><title>Qwen 3 offers a case study in how to effectively release a model</title><link href="https://simonwillison.net/2025/Apr/29/qwen-3/" rel="alternate"/><published>2025-04-29T00:37:03+00:00</published><updated>2025-04-29T00:37:03+00:00</updated><id>https://simonwillison.net/2025/Apr/29/qwen-3/</id><summary type="html">
    &lt;p&gt;Alibaba's Qwen team released the hotly anticipated &lt;a href="https://qwenlm.github.io/blog/qwen3/"&gt;Qwen 3 model family&lt;/a&gt; today. The Qwen models are already some of the best open weight models - Apache 2.0 licensed and with a variety of different capabilities (including vision and audio input/output).&lt;/p&gt;
&lt;p&gt;Qwen 3 is text input/output only for the moment and comes in an exciting range of different shapes and sizes: 32B, 14B, 8B, 4B, 1.7B, and 0.6B models. The 4B and up models all have 131,072 token context windows (extended from 32k using YaRN) - 0.6B, and 1.7B are 32,768.&lt;/p&gt;
&lt;p&gt;This covers the full spectrum of sizes that I generally care about: 0.6B and 1.7B should run fine on an iPhone, and 32B will fit on my 64GB Mac with room to spare for other applications.&lt;/p&gt;
&lt;p&gt;Qwen also released two Mixture of Experts models - Qwen3-30B-A3B and Qwen3-235B-A22B. The A stands for "active parameters" - Qwen3-30B-A3B is a 30 billion parameter model that keeps 3 billion active at once, which speeds up inference (I previously said it reduces the memory needed to run the models, but &lt;a href="https://bsky.app/profile/pekka.bsky.social/post/3lnw2knbkls2e"&gt;that's incorrect&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;All eight of these models are released under the Apache 2.0 license.&lt;/p&gt;
&lt;p&gt;Qwen describe these as "hybrid thinking" models - every one of them is capable of the "reason step by step" trick before they deliver their final answer. In my experiments so far this presents itself as a &lt;code&gt;&amp;lt;think&amp;gt;...&amp;lt;/think&amp;gt;&lt;/code&gt; block at the start of the response.&lt;/p&gt;
&lt;p&gt;That thinking mode can be turned on and off by including special &lt;code&gt;/think&lt;/code&gt; and &lt;code&gt;/no_think&lt;/code&gt; tokens in the prompt. It's on by default.&lt;/p&gt;
&lt;p&gt;One last interesting snippet from the announcement:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We have optimized the Qwen3 models for coding and agentic capabilities, and also we have strengthened the support of MCP as well.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is the first time I've seen a model specifically trained for the &lt;a href="https://www.anthropic.com/news/model-context-protocol"&gt;Model Context Protocol&lt;/a&gt;, which was first announced by Anthropic last November.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://simonwillison.net/2025/Apr/29/qwen-3/#trying-out-qwen-3-via-ollama"&gt;Trying out Qwen 3 via Ollama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://simonwillison.net/2025/Apr/29/qwen-3/#a-really-well-coordinated-release"&gt;A really well coordinated release&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://simonwillison.net/2025/Apr/29/qwen-3/#the-continuing-trend-of-better-models-that-run-on-the-same-hardware"&gt;The continuing trend of better models that run on the same hardware&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id="trying-out-qwen-3-via-ollama"&gt;Trying out Qwen 3 via Ollama&lt;/h4&gt;
&lt;p&gt;Let's see that in action. I started out with Qwen 32B from &lt;a href="https://www.ollama.com/"&gt;Ollama&lt;/a&gt; - a 20GB download:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;ollama pull qwen3:32b&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I ran a prompt against it using &lt;a href="https://llm.datasette.io/"&gt;LLM&lt;/a&gt; and the &lt;a href="https://github.com/taketwo/llm-ollama"&gt;llm-ollama plugin&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;llm -m qwen3:32b &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Generate an SVG of a pelican riding a bicycle&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here's the truncated output I got back (you can see the full response &lt;a href="https://gist.github.com/simonw/2cd679d2cfa41fffb37ebc4a2c5c3e4b"&gt;in this Gist&lt;/a&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt;&lt;br /&gt;
Okay, the user wants an SVG of a pelican riding a bicycle. Let me start by breaking down the components needed. First, I need to create the pelican. Pelicans have a distinctive beak and pouch, so I'll need to draw that. Maybe start with an ellipse for the body, then add the beak as a triangle. The wings could be curved shapes on either side.&lt;/p&gt;
&lt;p&gt;Next, the bicycle. I'll need two wheels, a frame, handlebars, and pedals. The wheels can be circles with some lines for spokes. The frame connects the wheels, with a seat and handlebars at the front. The pedals are small circles with lines for the crank.&lt;/p&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;I think that's a plan. Now, translate this into SVG code step by step, making sure coordinates and shapes are correctly placed.&lt;br /&gt;
&lt;code&gt;&amp;lt;/think&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Here's an SVG of a pelican riding a bicycle, created using simple shapes and paths:&lt;/p&gt;
&lt;div class="highlight highlight-text-xml"&gt;&lt;pre&gt;&amp;lt;&lt;span class="pl-ent"&gt;svg&lt;/span&gt; &lt;span class="pl-e"&gt;viewBox&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;0 0 200 200&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;xmlns&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;http://www.w3.org/2000/svg&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;&amp;gt;
  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Bicycle Frame &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;line&lt;/span&gt; &lt;span class="pl-e"&gt;x1&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;40&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;y1&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;100&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;x2&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;120&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;y2&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;100&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;black&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke-width&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;4&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
  &amp;lt;&lt;span class="pl-ent"&gt;line&lt;/span&gt; &lt;span class="pl-e"&gt;x1&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;120&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;y1&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;100&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;x2&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;140&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;y2&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;80&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;black&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;stroke-width&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;4&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
  [...]
  &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;&amp;lt;!--&lt;/span&gt; Bicycle Handlebars &lt;span class="pl-c"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &amp;lt;&lt;span class="pl-ent"&gt;rect&lt;/span&gt; &lt;span class="pl-e"&gt;x&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;30&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;y&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;80&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;width&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;20&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;height&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;5&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-e"&gt;fill&lt;/span&gt;=&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;#8B4513&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;/&amp;gt;
&amp;lt;/&lt;span class="pl-ent"&gt;svg&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This SVG features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A basic bicycle frame with two wheels, spokes, and a seat&lt;/li&gt;
&lt;li&gt;A blue pelican with:
&lt;ul&gt;
&lt;li&gt;A rounded body and head&lt;/li&gt;
&lt;li&gt;A distinctive yellow beak and orange pouch&lt;/li&gt;
&lt;li&gt;Two wings extending from the body&lt;/li&gt;
&lt;li&gt;Webbed feet wrapped around the bicycle frame&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Simple handlebars at the front of the bicycle&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The pelican is positioned sitting on the bicycle seat with wings slightly spread for balance. You can copy this code into an HTML file or SVG editor to view the illustration. The colors use traditional bicycle brown (#8B4513) and a classic blue for the pelican (#4169E1) with gold accents for the beak (#FFD700).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As is often the case with "reasoning" models, reading the reasoning chain is more interesting than the finished result. Here's what the SVG looks like when you render it:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://static.simonwillison.net/static/2025/qwen3-32b-pelican.jpg" alt="The bicycle looks more like a shopping cart. The pelican is a bunch of overlapping blue shapes and the yellow bill is misconfigured. It's not a great effort to be honest." style="max-width: 100%;" /&gt;&lt;/p&gt;
&lt;p&gt;Not the best pelican on a bicycle, but &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle/"&gt;I've seen worse&lt;/a&gt;!&lt;/p&gt;
&lt;h4 id="a-really-well-coordinated-release"&gt;A really well coordinated release&lt;/h4&gt;
&lt;p&gt;The thing that stands out most to me about the Qwen 3 release is how well coordinated it was across the LLM ecosystem.&lt;/p&gt;
&lt;p&gt;Qwen worked directly with almost all of the popular LLM serving frameworks to ensure that support for the new models was available on day one.&lt;/p&gt;
&lt;p&gt;The Qwen 3 README &lt;a href="https://github.com/QwenLM/Qwen3/blob/main/README.md#run-qwen3"&gt;mentions the following projects&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://huggingface.co/docs/transformers/en/index"&gt;Transformers&lt;/a&gt; Python library&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.modelscope.cn/"&gt;ModelScope&lt;/a&gt; (effectively the Chinese equivalent of Hugging Face for model distribution)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ggml-org/llama.cpp"&gt;llama.cpp&lt;/a&gt;, which added support for the Qwen 3 architecture &lt;a href="https://github.com/ggml-org/llama.cpp/releases/tag/b5092"&gt;three weeks ago&lt;/a&gt; in version &lt;code&gt;b5092&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ollama.com/"&gt;Ollama&lt;/a&gt;, with &lt;a href="https://ollama.com/library/qwen3"&gt;qwen3&lt;/a&gt; out on release day&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lmstudio.ai/"&gt;LMStudio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ml-explore/mlx-lm"&gt;mlx-lm&lt;/a&gt; for Apple Silicon - the first commit for Qwen 3 support in MLX showed up in a PR &lt;a href="https://github.com/ml-explore/mlx-lm/pull/41"&gt;over a month ago&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/sgl-project/sglang"&gt;SGLang&lt;/a&gt; serving framework&lt;/li&gt;
&lt;li&gt;The popular &lt;a href="https://github.com/vllm-project/vllm"&gt;vLLM&lt;/a&gt; engine&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.hiascend.com/en/software/mindie"&gt;MindIE&lt;/a&gt;, which I haven't heard of before but looks to be a serving framework for Huawei's Ascend chips (competitive with NVIDIA's GPUs)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is an extraordinary level of coordination for a model release! I haven't seen any other model providers make this level of effort - the usual pattern is to dump a bunch of models on Hugging Face for a single architecture (usually NVIDIA) and then wait for the community to catch up with quantizations and conversions for everything else.&lt;/p&gt;
&lt;p&gt;It's also great to see smaller models that can run on consumer hardware on day one. I think one of the reasons &lt;a href="https://simonwillison.net/2025/Apr/5/llama-4-notes/"&gt;the Llama 4 release&lt;/a&gt; a few weeks ago was a little muted is that very few people had access to hardware that was capable of running the models.&lt;/p&gt;
&lt;p&gt;The one thing that's missing here is hosted API partnerships - something Meta did a good job of with Llama 4, which was available (albeit with some bugs) on Groq, Fireworks and Together on the day of release.&lt;/p&gt;
&lt;h4 id="the-continuing-trend-of-better-models-that-run-on-the-same-hardware"&gt;The continuing trend of better models that run on the same hardware&lt;/h4&gt;
&lt;p&gt;I don't have a great feeling for the general "vibes" of Qwen 3 yet - it's only been available for a few hours and I've not really run it through its paces yet. The general buzz so far seems pretty positive and the initial benchmarks are promising, but these things always take a little while to shake out.&lt;/p&gt;
&lt;p&gt;Assuming those benchmarks hold up, I think this is a very strong model. My favourite detail from the release announcement is this (highlight mine):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Due to advancements in model architecture, increase in training data, and more effective training methods, the overall performance of Qwen3 dense base models matches that of Qwen2.5 base models with more parameters. For instance, &lt;strong&gt;Qwen3-1.7B/4B/8B/14B/32B-Base performs as well as Qwen2.5-3B/7B/14B/32B/72B-Base, respectively&lt;/strong&gt;. Notably, in areas like STEM, coding, and reasoning, Qwen3 dense base models even outperform larger Qwen2.5 models.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm always keen to see this trend continue: better models that can run on the same hardware as their predecessors.&lt;/p&gt;
&lt;p&gt;We've seen the same trend with other models - Llama 3.3 70B &lt;a href="https://simonwillison.net/2024/Dec/9/llama-33-70b/"&gt;claimed to deliver&lt;/a&gt; "similar performance to Llama 3.1 405B", and Mistral Small 3 24B &lt;a href="https://simonwillison.net/2025/Jan/30/mistral-small-3/"&gt;said that&lt;/a&gt; it was "on par with Llama 3.3 70B instruct, while being more than 3x faster on the same hardware."&lt;/p&gt;
&lt;p&gt;At some point this trend will have to stop, but for the moment it's exciting to continue to see new optimizations emerge that allow us to run even better smaller models.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-tool-use"&gt;llm-tool-use&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/model-context-protocol"&gt;model-context-protocol&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="llm"/><category term="llm-tool-use"/><category term="qwen"/><category term="mlx"/><category term="ollama"/><category term="pelican-riding-a-bicycle"/><category term="llm-reasoning"/><category term="llm-release"/><category term="model-context-protocol"/><category term="ai-in-china"/></entry><entry><title>llm-fragments-github 0.2</title><link href="https://simonwillison.net/2025/Apr/20/llm-fragments-github/" rel="alternate"/><published>2025-04-20T14:01:09+00:00</published><updated>2025-04-20T14:01:09+00:00</updated><id>https://simonwillison.net/2025/Apr/20/llm-fragments-github/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/simonw/llm-fragments-github/releases/tag/0.2"&gt;llm-fragments-github 0.2&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I upgraded my &lt;code&gt;llm-fragments-github&lt;/code&gt; plugin to add a new fragment type called &lt;code&gt;issue&lt;/code&gt;. It lets you pull the entire content of a GitHub issue thread into your prompt as a concatenated Markdown file. &lt;/p&gt;
&lt;p&gt;(If you haven't seen fragments before I introduced them in &lt;a href="https://simonwillison.net/2025/Apr/7/long-context-llm/"&gt;Long context support in LLM 0.24 using fragments and template plugins&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;I used it just now to have Gemini 2.5 Pro provide feedback and attempt an implementation of a complex issue against my &lt;a href="https://github.com/simonw/llm"&gt;LLM&lt;/a&gt; project:&lt;/p&gt;
&lt;pre&gt;llm install llm-fragments-github
llm -f github:simonw/llm \
  -f issue:simonw/llm/938 \
  -m gemini-2.5-pro-exp-03-25 \
  --system &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;muse on this issue, then propose a whole bunch of code to help implement it&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Here I'm loading the FULL content of the &lt;code&gt;simonw/llm&lt;/code&gt; repo using that &lt;code&gt;-f github:simonw/llm&lt;/code&gt; fragment (&lt;a href="https://github.com/simonw/llm-fragments-github?tab=readme-ov-file#usage"&gt;documented here&lt;/a&gt;), then loading all of the comments from &lt;a href="https://github.com/simonw/llm/issues/938"&gt;issue 938&lt;/a&gt; where I discuss quite a complex potential refactoring. I ask Gemini 2.5 Pro to "muse on this issue" and come up with some code.&lt;/p&gt;
&lt;p&gt;This worked &lt;em&gt;shockingly&lt;/em&gt; well. Here's &lt;a href="https://gist.github.com/simonw/a5f0c1e8184f4ddc8b71b30890fe690c#response"&gt;the full response&lt;/a&gt;, which highlighted a few things I hadn't considered yet (such as the need to migrate old database records to the new tree hierarchy) and then spat out a whole bunch of code which looks like a solid start to the actual implementation work I need to do.&lt;/p&gt;
&lt;p&gt;I ran this against Google's free Gemini 2.5 Preview, but if I'd used the paid model it would have cost me 202,680 input tokens, 10,460 output tokens and 1,859 thinking tokens for a total of 62.989 cents.&lt;/p&gt;
&lt;p&gt;As a fun extra, the new &lt;code&gt;issue:&lt;/code&gt; feature itself was written almost entirely by OpenAI o3, again using fragments. I ran this:&lt;/p&gt;
&lt;pre&gt;llm -m openai/o3 \
  -f https://raw.githubusercontent.com/simonw/llm-hacker-news/refs/heads/main/llm_hacker_news.py \
  -f https://raw.githubusercontent.com/simonw/tools/refs/heads/main/github-issue-to-markdown.html \
  -s &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Write a new fragments plugin in Python that registers issue:org/repo/123 which fetches that issue&lt;/span&gt;
&lt;span class="pl-s"&gt;      number from the specified github repo and uses the same markdown logic as the HTML page to turn that into a fragment&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Here I'm using the ability to pass a URL to &lt;code&gt;-f&lt;/code&gt; and giving it the full source of my &lt;a href="https://github.com/simonw/llm-hacker-news/blob/main/llm_hacker_news.py"&gt;llm_hacker_news.py&lt;/a&gt; plugin (which shows how a fragment can load data from an API) plus the &lt;a href="https://github.com/simonw/tools/blob/main/github-issue-to-markdown.html"&gt;HTML source&lt;/a&gt; of my &lt;a href="https://tools.simonwillison.net/github-issue-to-markdown"&gt;github-issue-to-markdown&lt;/a&gt; tool (which I wrote a few months ago &lt;a href="https://gist.github.com/simonw/cd1afb97e595b40fdeedebb48be7f4f1"&gt;with Claude&lt;/a&gt;). I effectively asked o3 to take that HTML/JavaScript tool and port it to Python to work with my fragments plugin mechanism.&lt;/p&gt;
&lt;p&gt;o3 provided &lt;a href="https://gist.github.com/simonw/249e16edffe6350f7265012bee9e3305#response"&gt;almost the exact implementation I needed&lt;/a&gt;, and even included support for a &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; environment variable without me thinking to ask for it. Total cost: 19.928 cents.&lt;/p&gt;
&lt;p&gt;On a final note of curiosity I tried running this prompt against &lt;a href="https://simonwillison.net/2025/Apr/19/gemma-3-qat-models/"&gt;Gemma 3 27B QAT&lt;/a&gt; running on my Mac via MLX and &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;llm install llm-mlx
llm mlx download-model mlx-community/gemma-3-27b-it-qat-4bit

llm -m mlx-community/gemma-3-27b-it-qat-4bit \
  -f https://raw.githubusercontent.com/simonw/llm-hacker-news/refs/heads/main/llm_hacker_news.py \
  -f https://raw.githubusercontent.com/simonw/tools/refs/heads/main/github-issue-to-markdown.html \
  -s &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Write a new fragments plugin in Python that registers issue:org/repo/123 which fetches that issue&lt;/span&gt;
&lt;span class="pl-s"&gt;      number from the specified github repo and uses the same markdown logic as the HTML page to turn that into a fragment&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;That worked &lt;a href="https://gist.github.com/simonw/feccff6ce3254556b848c27333f52543#response"&gt;pretty well too&lt;/a&gt;. It turns out a 16GB local model file is powerful enough to write me an LLM plugin now!


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/github"&gt;github&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/plugins"&gt;plugins&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemini"&gt;gemini&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/o3"&gt;o3&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/long-context"&gt;long-context&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemma"&gt;gemma&lt;/a&gt;&lt;/p&gt;



</summary><category term="github"/><category term="plugins"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="ai-assisted-programming"/><category term="llm"/><category term="gemini"/><category term="mlx"/><category term="o3"/><category term="long-context"/><category term="gemma"/></entry><entry><title>Gemma 3 QAT Models</title><link href="https://simonwillison.net/2025/Apr/19/gemma-3-qat-models/" rel="alternate"/><published>2025-04-19T17:20:50+00:00</published><updated>2025-04-19T17:20:50+00:00</updated><id>https://simonwillison.net/2025/Apr/19/gemma-3-qat-models/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://developers.googleblog.com/en/gemma-3-quantized-aware-trained-state-of-the-art-ai-to-consumer-gpus/"&gt;Gemma 3 QAT Models&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Interesting release from Google, as a follow-up &lt;a href="https://simonwillison.net/2025/Mar/12/gemma-3/"&gt;to Gemma 3&lt;/a&gt; from last month:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To make Gemma 3 even more accessible, we are announcing new versions optimized with Quantization-Aware Training (QAT) that dramatically reduces memory requirements while maintaining high quality. This enables you to run powerful models like Gemma 3 27B locally on consumer-grade GPUs like the NVIDIA RTX 3090.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I wasn't previously aware of Quantization-Aware Training but it turns out to be quite an established pattern now, supported in both &lt;a href="https://www.tensorflow.org/model_optimization/guide/quantization/training"&gt;Tensorflow&lt;/a&gt; and &lt;a href="https://pytorch.org/blog/quantization-aware-training/"&gt;PyTorch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Google report model size drops from BF16 to int4 for the following models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gemma 3 27B: 54GB to 14.1GB&lt;/li&gt;
&lt;li&gt;Gemma 3 12B: 24GB to 6.6GB&lt;/li&gt;
&lt;li&gt;Gemma 3 4B: 8GB to 2.6GB&lt;/li&gt;
&lt;li&gt;Gemma 3 1B: 2GB to 0.5GB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They partnered with Ollama, LM Studio, MLX (here's &lt;a href="https://huggingface.co/collections/mlx-community/gemma-3-qat-68002674cd5afc6f9022a0ae"&gt;their collection&lt;/a&gt;) and llama.cpp for this release - I'd love to see more AI labs following their example.&lt;/p&gt;
&lt;p&gt;The Ollama model version picker currently hides them behind "View all" option, so here are the direct links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ollama.com/library/gemma3:1b-it-qat"&gt;gemma3:1b-it-qat&lt;/a&gt; - 1GB&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ollama.com/library/gemma3:4b-it-qat"&gt;gemma3:4b-it-qat&lt;/a&gt; - 4GB&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ollama.com/library/gemma3:12b-it-qat"&gt;gemma3:12b-it-qat&lt;/a&gt; - 8.9GB&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ollama.com/library/gemma3:27b-it-qat"&gt;gemma3:27b-it-qat&lt;/a&gt; - 18GB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I fetched that largest model with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull gemma3:27b-it-qat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now I'm trying it out with &lt;a href="https://github.com/taketwo/llm-ollama"&gt;llm-ollama&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m gemma3:27b-it-qat "impress me with some physics"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I got &lt;a href="https://gist.github.com/simonw/5b699ba6b7c05e2d071910e238823ff4"&gt;a pretty great response&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Having spent a while putting it through its paces via &lt;a href="https://simonwillison.net/2024/Dec/27/open-webui/"&gt;Open WebUI&lt;/a&gt; and &lt;a href="https://tailscale.com/"&gt;Tailscale&lt;/a&gt; to access my laptop from my phone I think this may be my new favorite general-purpose local model. Ollama appears to use 22GB of RAM while the model is running, which leaves plenty on my 64GB machine for other applications.&lt;/p&gt;
&lt;p&gt;I've also tried it via &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt; like this (downloading 16GB):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-mlx
llm mlx download-model mlx-community/gemma-3-27b-it-qat-4bit
llm chat -m mlx-community/gemma-3-27b-it-qat-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It feels a little faster with MLX and uses 15GB of memory according to Activity Monitor.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tailscale"&gt;tailscale&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemma"&gt;gemma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lm-studio"&gt;lm-studio&lt;/a&gt;&lt;/p&gt;



</summary><category term="google"/><category term="ai"/><category term="tailscale"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="llm"/><category term="mlx"/><category term="ollama"/><category term="gemma"/><category term="llm-release"/><category term="lm-studio"/></entry><entry><title>Initial impressions of Llama 4</title><link href="https://simonwillison.net/2025/Apr/5/llama-4-notes/" rel="alternate"/><published>2025-04-05T22:47:58+00:00</published><updated>2025-04-05T22:47:58+00:00</updated><id>https://simonwillison.net/2025/Apr/5/llama-4-notes/</id><summary type="html">
    &lt;p&gt;Dropping a model release as significant as Llama 4 on a weekend is plain unfair! So far the best place to learn about the new model family is &lt;a href="https://ai.meta.com/blog/llama-4-multimodal-intelligence/"&gt;this post on the Meta AI blog&lt;/a&gt;. They've released two new models today: Llama 4 Maverick is a 400B model (128 experts, 17B active parameters), text and image input with a 1 million token context length. Llama 4 Scout is 109B total parameters (16 experts, 17B active), also multi-modal and with a claimed 10 million token context length - an industry first.&lt;/p&gt;

&lt;p&gt;They also describe Llama 4 Behemoth, a not-yet-released "288 billion active parameter model with 16 experts that is our most powerful yet and among the world’s smartest LLMs". Behemoth has 2 trillion parameters total and was used to train both Scout and Maverick.&lt;/p&gt;
&lt;p&gt;No news yet on a Llama reasoning model beyond &lt;a href="https://www.llama.com/llama4-reasoning-is-coming/"&gt;this coming soon page&lt;/a&gt; with a looping video of an academic-looking llama.&lt;/p&gt;

&lt;p id="lmarena"&gt;Llama 4 Maverick is now sat in second place on &lt;a href="https://lmarena.ai/?leaderboard"&gt;the LM Arena leaderboard&lt;/a&gt;, just behind Gemini 2.5 Pro. &lt;em&gt;&lt;strong&gt;Update&lt;/strong&gt;: It turns out that's not the same model as the Maverick they released - I missed that their announcement says "Llama 4 Maverick offers a best-in-class performance to cost ratio with an experimental chat version scoring ELO of 1417 on LMArena."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can try them out using the chat interface from OpenRouter (or through the OpenRouter API) for &lt;a href="https://openrouter.ai/meta-llama/llama-4-scout"&gt;Llama 4 Scout&lt;/a&gt; and &lt;a href="https://openrouter.ai/meta-llama/llama-4-maverick"&gt;Llama 4 Maverick&lt;/a&gt;. OpenRouter are proxying through to &lt;a href="https://console.groq.com/docs/models"&gt;Groq&lt;/a&gt;, &lt;a href="https://fireworks.ai/models"&gt;Fireworks&lt;/a&gt; and &lt;a href="https://docs.together.ai/docs/serverless-models"&gt;Together&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Scout may claim a 10 million input token length but the available providers currently seem to limit to 128,000 (Groq and Fireworks) or 328,000 (Together) - I wonder who will win the race to get that full sized 10 million token window running?&lt;/p&gt;
&lt;p&gt;Llama 4 Maverick claims a 1 million token input length -  Fireworks offers 1.05M while Together offers 524,000. Groq isn't offering Maverick yet.&lt;/p&gt;
&lt;p&gt;Meta AI's &lt;a href="https://github.com/meta-llama/llama-cookbook/blob/main/getting-started/build_with_llama_4.ipynb"&gt;build_with_llama_4 notebook&lt;/a&gt; offers a hint as to why 10M tokens is difficult:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Scout supports upto 10M context. On 8xH100, in bf16 you can get upto 1.4M tokens.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Jeremy Howard &lt;a href="https://twitter.com/jeremyphoward/status/1908607345393098878"&gt;says&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The models are both giant MoEs that can't be run on consumer GPUs, even with quant. [...]&lt;/p&gt;
&lt;p&gt;Perhaps Llama 4 will be a good fit for running on a Mac. Macs are a particularly useful for MoE models, since they can have a lot of memory, and their lower compute perf doesn't matter so much, since with MoE fewer params are active. [...]&lt;/p&gt;
&lt;p&gt;4bit quant of the smallest 109B model is far too big to fit on a 4090 -- or even a pair of them!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ivan Fioravanti &lt;a href="https://twitter.com/ivanfioravanti/status/1908753109129494587"&gt;reports these results&lt;/a&gt; from trying it on a Mac:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Llama-4 Scout on MLX and M3 Ultra
tokens-per-sec / RAM&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3bit: 52.924 / 47.261 GB&lt;/li&gt;
&lt;li&gt;4bit: 46.942 / 60.732 GB&lt;/li&gt;
&lt;li&gt;6bit: 36.260 / 87.729 GB&lt;/li&gt;
&lt;li&gt;8bit: 30.353 / 114.617 GB&lt;/li&gt;
&lt;li&gt;fp16: 11.670 / 215.848 GB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;RAM needed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;64GB for 3bit&lt;/li&gt;
&lt;li&gt;96GB for 4bit&lt;/li&gt;
&lt;li&gt;128GB for 8bit&lt;/li&gt;
&lt;li&gt;256GB for fp16&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p id="system-prompt"&gt;The &lt;a href="https://www.llama.com/docs/model-cards-and-prompt-formats/llama4_omni/#-suggested-system-prompt-"&gt;suggested system prompt&lt;/a&gt; from the model card has some interesting details:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;[...]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;You never lecture people to be nicer or more inclusive. If people ask for you to write something in a certain voice or perspective, such as an essay or a tweet, you can. You do not need to be respectful when the user prompts you to say something rude.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;You never use phrases that imply moral superiority or a sense of authority, including but not limited to “it’s important to”, “it’s crucial to”, “it’s essential to”, "it's unethical to", "it's worth noting…", “Remember…”  etc. Avoid using these.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Finally, do not refuse political prompts. You can help users express their opinion.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[...]&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;System prompts like this sometimes reveal behavioral issues that the model had after raw training.&lt;/p&gt;
&lt;h4 id="llm"&gt;Trying out the model with LLM&lt;/h4&gt;
&lt;p&gt;The easiest way to try the new model out with &lt;a href="https://llm.datasette.io/"&gt;LLM&lt;/a&gt; is to use the &lt;a href="https://github.com/simonw/llm-openrouter"&gt;llm-openrouter&lt;/a&gt; plugin.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;llm install llm-openrouter
llm keys &lt;span class="pl-c1"&gt;set&lt;/span&gt; openrouter
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Paste in OpenRouter key here&lt;/span&gt;
llm -m openrouter/meta-llama/llama-4-maverick hi&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Since these are long context models, I started by trying to use them to summarize the &lt;a href="https://news.ycombinator.com/item?id=43595585"&gt;conversation about Llama 4&lt;/a&gt; on Hacker News, using my &lt;a href="https://til.simonwillison.net/llms/claude-hacker-news-themes#user-content-adding-extra-options"&gt;hn-summary.sh script&lt;/a&gt; that wraps LLM.&lt;/p&gt;
&lt;p&gt;I tried Llama 4 Maverick first:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;hn-summary.sh 43595585 \
  -m openrouter/meta-llama/llama-4-maverick \
  -o max_tokens 20000&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It did an OK job, starting like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;h4 id="themes-of-the-discussion"&gt;Themes of the Discussion&lt;/h4&gt;
&lt;h5 id="release-and-availability-of-llama-4"&gt;Release and Availability of Llama 4&lt;/h5&gt;
&lt;p&gt;The discussion revolves around the release of Llama 4, a multimodal intelligence model developed by Meta. Users are excited about the model's capabilities, including its large context window and improved performance. Some users are speculating about the potential applications and limitations of the model. [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/016ea0fd83fc499f046a94827f9b4946"&gt;the full output&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For reference, my system prompt looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Summarize the themes of the opinions expressed here. For each theme, output a markdown header. Include direct "quotations" (with author attribution) where appropriate. You MUST quote directly from users when crediting them, with double quotes. Fix HTML entities. Output markdown. Go long. Include a section of quotes that illustrate opinions uncommon in the rest of the piece&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I then tried it with Llama 4 Scout via OpenRouter and got complete junk output for some reason:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hn-summary.sh 43595585 \
  -m openrouter/meta-llama/llama-4-scout \
  -o max_tokens 20000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/simonw/d01cc991d478939e87487d362a8f881f"&gt;Full output&lt;/a&gt;. It starts like this and then continues for the full 20,000 tokens:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The discussion here is about another conversation that was uttered.)&lt;/p&gt;
&lt;p&gt;Here are the results.)&lt;/p&gt;
&lt;p&gt;The conversation between two groups, and I have the same questions on the contrary than those that are also seen in a model."). The fact that I see a lot of interest here.)&lt;/p&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;The reason) The reason) The reason &lt;em&gt;(loops until it runs out of tokens)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This looks broken. I was using OpenRouter so it's possible I got routed to a broken instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 7th April 2025&lt;/strong&gt;: Meta AI's &lt;a href="https://twitter.com/ahmad_al_dahle/status/1909302532306092107"&gt;Ahmed Al-Dahle&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[...] we're also hearing some reports of mixed quality across different services. Since we dropped the models as soon as they were ready, we expect it'll take several days for all the public implementations to get dialed in. We'll keep working through our bug fixes and onboarding partners.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I later managed to run the prompt directly through Groq (with the &lt;a href="https://github.com/angerman/llm-groq"&gt;llm-groq&lt;/a&gt; plugin) - but that had a 2048 limit on output size for some reason:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hn-summary.sh 43595585 \
  -m groq/meta-llama/llama-4-scout-17b-16e-instruct \
  -o max_tokens 2048
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/a205c5fc131a1d4e9cd6c432a07feedb"&gt;the full result&lt;/a&gt;. It followed my instructions but was &lt;em&gt;very&lt;/em&gt; short - just 630 tokens of output.&lt;/p&gt;
&lt;p&gt;For comparison, here's &lt;a href="https://gist.github.com/simonw/f21ecc7fb2aa13ff682d4ffa11ddcbfd"&gt;the same thing&lt;/a&gt; run against Gemini 2.5 Pro. Gemini's results was &lt;em&gt;massively&lt;/em&gt; better, producing 5,584 output tokens (it spent an additional 2,667 tokens on "thinking").&lt;/p&gt;
&lt;p&gt;I'm not sure how much to judge Llama 4 by these results to be honest - the model has only been out for a few hours and it's quite possible that the providers I've tried running again aren't yet optimally configured for this kind of long-context prompt.&lt;/p&gt;
&lt;h4 id="my-hopes-for-llama-4"&gt;My hopes for Llama 4&lt;/h4&gt;
&lt;p&gt;I'm hoping that Llama 4 plays out in a similar way to Llama 3.&lt;/p&gt;
&lt;p&gt;The first Llama 3 models released were 8B and 70B, &lt;a href="https://ai.meta.com/blog/meta-llama-3/"&gt;last April&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Llama 3.1 followed &lt;a href="https://ai.meta.com/blog/meta-llama-3-1/"&gt;in July&lt;/a&gt; at 8B, 70B, and 405B. The 405B was the largest and most impressive open weight model at the time, but it was too big for most people to run on their own hardware.&lt;/p&gt;
&lt;p&gt;Llama 3.2 &lt;a href="https://ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/"&gt;in September&lt;/a&gt; is where things got really interesting: 1B, 3B, 11B and 90B. The 1B and 3B models both work on my iPhone, and are surprisingly capable! The 11B and 90B models were the first Llamas to support vision, and the 11B &lt;a href="https://simonwillison.net/2024/Sep/25/llama-32/"&gt;ran on my Mac&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then Llama 3.3 landed in December with a 70B model that &lt;a href="https://simonwillison.net/2024/Dec/9/llama-33-70b/"&gt;I wrote about as a GPT-4 class model that ran on my Mac&lt;/a&gt;. It claimed performance similar to the earlier Llama 3.1 405B!&lt;/p&gt;
&lt;p&gt;Today's Llama 4 models are 109B and 400B, both of which were trained with the help of the so-far unreleased 2T Llama 4 Behemoth.&lt;/p&gt;
&lt;p&gt;My hope is that we'll see a whole family of Llama 4 models at varying sizes, following the pattern of Llama 3. I'm particularly excited to see if they produce an improved ~3B model that runs on my phone. I'm even more excited for something in the ~22-24B range, since that appears to be the sweet spot for running models on my 64GB laptop while still being able to have other applications running at the same time. Mistral Small 3.1 is a 24B model and is &lt;a href="https://simonwillison.net/2025/Mar/17/mistral-small-31/"&gt;absolutely superb&lt;/a&gt;.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llama"&gt;llama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jeremy-howard"&gt;jeremy-howard&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemini"&gt;gemini&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/groq"&gt;groq&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/meta"&gt;meta&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/long-context"&gt;long-context&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/openrouter"&gt;openrouter&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/chatbot-arena"&gt;chatbot-arena&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="ai"/><category term="generative-ai"/><category term="llama"/><category term="llms"/><category term="jeremy-howard"/><category term="llm"/><category term="gemini"/><category term="vision-llms"/><category term="groq"/><category term="meta"/><category term="mlx"/><category term="long-context"/><category term="llm-release"/><category term="openrouter"/><category term="chatbot-arena"/></entry><entry><title>Qwen2.5-VL-32B: Smarter and Lighter</title><link href="https://simonwillison.net/2025/Mar/24/qwen25-vl-32b/" rel="alternate"/><published>2025-03-24T22:43:22+00:00</published><updated>2025-03-24T22:43:22+00:00</updated><id>https://simonwillison.net/2025/Mar/24/qwen25-vl-32b/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://qwenlm.github.io/blog/qwen2.5-vl-32b/"&gt;Qwen2.5-VL-32B: Smarter and Lighter&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The second big open weight LLM release from China today - the first being &lt;a href="https://simonwillison.net/2025/Mar/24/deepseek/"&gt;DeepSeek v3-0324&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Qwen's previous vision model was Qwen2.5 VL, &lt;a href="https://simonwillison.net/2025/Jan/27/qwen25-vl-qwen25-vl-qwen25-vl/"&gt;released in January&lt;/a&gt; in 3B, 7B and 72B sizes.&lt;/p&gt;
&lt;p&gt;Today's Apache 2.0 licensed release is a 32B model, which is quickly becoming my personal favourite model size - large enough to have GPT-4-class capabilities, but small enough that on my 64GB Mac there's still enough RAM for me to run other memory-hungry applications like Firefox and VS Code.&lt;/p&gt;
&lt;p&gt;Qwen claim that the new model (when compared to their previous 2.5 VL family) can "align more closely with human preferences", is better at "mathematical reasoning" and provides "enhanced accuracy and detailed analysis in tasks such as image parsing, content recognition, and visual logic deduction".&lt;/p&gt;
&lt;p&gt;They also offer some presumably carefully selected benchmark results showing it out-performing Gemma 3-27B, Mistral Small 3.1 24B and GPT-4o-0513 (there have been two more recent GPT-4o releases since that one, 2024-08-16 and 2024-11-20).&lt;/p&gt;
&lt;p&gt;As usual, Prince Canuma had MLX versions of the models live within hours of the release, in &lt;a href="https://huggingface.co/mlx-community/Qwen2.5-VL-32B-Instruct-4bit"&gt;4 bit&lt;/a&gt;, &lt;a href="https://huggingface.co/mlx-community/Qwen2.5-VL-32B-Instruct-6bit"&gt;6 bit&lt;/a&gt;, &lt;a href="https://huggingface.co/mlx-community/Qwen2.5-VL-32B-Instruct-8bit"&gt;8 bit&lt;/a&gt;, and &lt;a href="https://huggingface.co/mlx-community/Qwen2.5-VL-32B-Instruct-bf16"&gt;bf16&lt;/a&gt; variants.&lt;/p&gt;
&lt;p&gt;I ran the 4bit version (a 18GB model download) using &lt;code&gt;uv&lt;/code&gt; and Prince's &lt;a href="https://github.com/Blaizzy/mlx-vlm"&gt;mlx-vlm&lt;/a&gt; like this:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell"&gt;&lt;pre&gt;uv run --with &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;numpy&amp;lt;2&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt; --with mlx-vlm \
  python -m mlx_vlm.generate \
    --model mlx-community/Qwen2.5-VL-32B-Instruct-4bit \
    --max-tokens 1000 \
    --temperature 0.0 \
    --prompt &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;Describe this image.&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; \
    --image Mpaboundrycdfw-1.png&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here's the image:&lt;/p&gt;
&lt;p&gt;&lt;img alt="A map image, described below" src="https://static.simonwillison.net/static/2025/Mpaboundrycdfw-1.png" /&gt;&lt;/p&gt;
&lt;p&gt;And here's the resulting description, which I found to be &lt;em&gt;very&lt;/em&gt; impressive:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This image appears to be a map highlighting specific areas along the coastline, likely in California, based on the geographical features and place names. Here is a detailed description of the image:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Geographic Features&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The map shows a section of the coastline, with land on the right and the sea on the left.&lt;/li&gt;
&lt;li&gt;The land area includes parts of SanMateo County, as noted in the top-right corner.&lt;/li&gt;
&lt;li&gt;The coastline features several named locations, including:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Point Montara&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pillar Point&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kings Rock&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VicenteCreek&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DennistonCreek&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State Beach&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Highlighted Areas&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The map contains two distinct areas marked with different colors:
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red Area (Top Section)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Labeled as "MONTARA" and "MONTARA M R" (possibly referring to a "Marine Reserves" or similar protected area).&lt;/li&gt;
&lt;li&gt;This area is marked with a dark red color and extends from the coastline inland.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue Area (Bottom Section)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Labeled as "PILLAR" and "PILLAR P O I N T" along with "SMCA" (Special Management Area).&lt;/li&gt;
&lt;li&gt;This area is marked with a blue color and is located closer to the coastline, including the area around "Pillar Point."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Depth Contours&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The map includes depth markings in the sea, indicating the bathymetrical features:
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;20 fathom (fm) line&lt;/strong&gt; is marked in the upper-left part of the sea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10 fathom (fm) line&lt;/strong&gt; is marked closer to the coastline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30 fathom (fm) line&lt;/strong&gt; is marked further out to sea.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Other Features&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State Beach&lt;/strong&gt;: Marked near the top-right, indicating a protected recreational area.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kings Rock&lt;/strong&gt;: A prominent feature near the coastline, likely a rocky outcropping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creeks&lt;/strong&gt;: The map shows several creeks, including &lt;strong&gt;VicenteCreek&lt;/strong&gt; and &lt;strong&gt;DennistonCreek&lt;/strong&gt;, which flow into the sea.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Protected Areas&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The map highlights specific protected areas:
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marine Reserves&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;"MONTARA M R" (Marine Reserves) in red.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Special Management Area (SMCA)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;"PILLAR P O I N T" in blue, indicating a Special Management Area.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grid and Coordinates&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The map includes a grid with latitude and longitude markings:
&lt;ul&gt;
&lt;li&gt;Latitude ranges from approximately 37°25'N to 37°35'N.&lt;/li&gt;
&lt;li&gt;Longitude ranges from approximately 122°22.5'W to 122°35.5'W.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Topography&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The land area shows topographic features, including elevations and vegetation, with green areas indicating higher elevations or vegetated land.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Other Labels&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"SMR"&lt;/strong&gt;: Likely stands for "State Managed Reserves."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"SMCA"&lt;/strong&gt;: Likely stands for "Special Management Control Area."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In summary, this map highlights specific protected areas along the coastline, including a red "Marine Reserves" area and a blue "Special Management Area" near "Pillar Point." The map also includes depth markings, geographical features, and place names, providing a detailed view of the region's natural and protected areas.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It included the following runtime statistics:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Prompt: 1051 tokens, 111.985 tokens-per-sec
Generation: 760 tokens, 17.328 tokens-per-sec
Peak memory: 21.110 GB
&lt;/code&gt;&lt;/pre&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/prince-canuma"&gt;prince-canuma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="vision-llms"/><category term="uv"/><category term="qwen"/><category term="mlx"/><category term="llm-release"/><category term="prince-canuma"/><category term="ai-in-china"/></entry><entry><title>deepseek-ai/DeepSeek-V3-0324</title><link href="https://simonwillison.net/2025/Mar/24/deepseek/" rel="alternate"/><published>2025-03-24T15:04:04+00:00</published><updated>2025-03-24T15:04:04+00:00</updated><id>https://simonwillison.net/2025/Mar/24/deepseek/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-V3-0324"&gt;deepseek-ai/DeepSeek-V3-0324&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Chinese AI lab DeepSeek just released the latest version of their enormous DeepSeek v3 model, baking the release date into the name &lt;code&gt;DeepSeek-V3-0324&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The license is MIT (that's new - previous DeepSeek v3 had a custom license), the README is empty and the release adds up a to a total of 641 GB of files, mostly of the form &lt;code&gt;model-00035-of-000163.safetensors&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The model only came out a few hours ago and MLX developer Awni Hannun already &lt;a href="https://twitter.com/awnihannun/status/1904177084609827054"&gt;has it running&lt;/a&gt; at &amp;gt;20 tokens/second on a 512GB M3 Ultra Mac Studio ($9,499 of ostensibly consumer-grade hardware) via &lt;a href="https://pypi.org/project/mlx-lm/"&gt;mlx-lm&lt;/a&gt; and this &lt;a href="https://huggingface.co/mlx-community/DeepSeek-V3-0324-4bit"&gt;mlx-community/DeepSeek-V3-0324-4bit&lt;/a&gt; 4bit quantization, which reduces the on-disk size to 352 GB.&lt;/p&gt;
&lt;p&gt;I think that means if you have that machine you can run it with my &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt; plugin like this, but I've not tried myself!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm mlx download-model mlx-community/DeepSeek-V3-0324-4bit
llm chat -m mlx-community/DeepSeek-V3-0324-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new model is also &lt;a href="https://openrouter.ai/deepseek/deepseek-chat-v3-0324:free"&gt;listed on OpenRouter&lt;/a&gt;. You can try a chat at &lt;a href="https://openrouter.ai/chat?models=deepseek/deepseek-chat-v3-0324:free"&gt;openrouter.ai/chat?models=deepseek/deepseek-chat-v3-0324:free&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here's what the chat interface &lt;a href="https://gist.github.com/simonw/3ce2bf5836743dfaf07d994578b261ba"&gt;gave me&lt;/a&gt; for "Generate an SVG of a pelican riding a bicycle":&lt;/p&gt;
&lt;p&gt;&lt;img alt="There's a pelican, and a bicycle, but both of them look disassembled." src="https://static.simonwillison.net/static/2025/deepseek-v3-pelican.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I have two API keys with OpenRouter - one of them worked with the model, the other gave me a &lt;code&gt;No endpoints found matching your data policy&lt;/code&gt; error - I think because I had a setting on that key disallowing models from training on my activity. The key that worked was a free key with no attached billing credentials.&lt;/p&gt;
&lt;p&gt;For my working API key the &lt;a href="https://github.com/simonw/llm-openrouter"&gt;llm-openrouter&lt;/a&gt; plugin let me run a prompt like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-openrouter
llm keys set openrouter
# Paste key here
llm -m openrouter/deepseek/deepseek-chat-v3-0324:free "best fact about a pelican"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's that "best fact" - the terminal output included Markdown and an emoji combo, here that's rendered.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One of the most fascinating facts about pelicans is their &lt;strong&gt;unique throat pouch&lt;/strong&gt;, called a &lt;strong&gt;gular sac&lt;/strong&gt;, which can hold up to &lt;strong&gt;3 gallons (11 liters) of water&lt;/strong&gt;—three times more than their stomach!  &lt;/p&gt;
&lt;p&gt;Here’s why it’s amazing:&lt;br /&gt;
- &lt;strong&gt;Fishing Tool&lt;/strong&gt;: They use it like a net to scoop up fish, then drain the water before swallowing.&lt;br /&gt;
- &lt;strong&gt;Cooling Mechanism&lt;/strong&gt;: On hot days, pelicans flutter the pouch to stay cool by evaporating water.&lt;br /&gt;
- &lt;strong&gt;Built-in "Shopping Cart"&lt;/strong&gt;: Some species even use it to carry food back to their chicks.  &lt;/p&gt;
&lt;p&gt;Bonus fact: Pelicans often &lt;strong&gt;fish cooperatively&lt;/strong&gt;, herding fish into shallow water for an easy catch.  &lt;/p&gt;
&lt;p&gt;Would you like more cool pelican facts? 🐦🌊&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In putting this post together I &lt;a href="https://claude.ai/share/fc65bf9b-ae2d-4b23-bd09-ed0d54ff4b56"&gt;got Claude&lt;/a&gt; to build me &lt;a href="https://tools.simonwillison.net/huggingface-storage"&gt;this new tool&lt;/a&gt; for finding the total on-disk size of a Hugging Face repository, which is available in their API but not currently displayed on their website.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Here's a notable independent benchmark &lt;a href="https://twitter.com/paulgauthier/status/1904304052500148423"&gt;from Paul Gauthier&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DeepSeek's new V3 scored 55% on aider's &lt;a href="https://aider.chat/docs/leaderboards/"&gt;polyglot benchmark&lt;/a&gt;, significantly improving over the prior version. It's the #2 non-thinking/reasoning model, behind only Sonnet 3.7. V3 is competitive with thinking models like R1 &amp;amp; o3-mini.&lt;/p&gt;
&lt;/blockquote&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/tools"&gt;tools&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hugging-face"&gt;hugging-face&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/deepseek"&gt;deepseek&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/openrouter"&gt;openrouter&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="tools"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="ai-assisted-programming"/><category term="hugging-face"/><category term="llm"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="deepseek"/><category term="llm-release"/><category term="openrouter"/><category term="ai-in-china"/></entry><entry><title>Mistral Small 3.1</title><link href="https://simonwillison.net/2025/Mar/17/mistral-small-31/" rel="alternate"/><published>2025-03-17T18:45:04+00:00</published><updated>2025-03-17T18:45:04+00:00</updated><id>https://simonwillison.net/2025/Mar/17/mistral-small-31/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://mistral.ai/fr/news/mistral-small-3-1"&gt;Mistral Small 3.1&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Mistral Small 3 &lt;a href="https://simonwillison.net/2025/Jan/30/mistral-small-3/"&gt;came out in January&lt;/a&gt; and was a notable, genuinely excellent local model that used an Apache 2.0 license.&lt;/p&gt;
&lt;p&gt;Mistral Small 3.1 offers a significant improvement: it's multi-modal (images) and has an increased 128,000 token context length, while still "fitting within a single RTX 4090 or a 32GB RAM MacBook once quantized" (according to their &lt;a href="https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503"&gt;model card&lt;/a&gt;). Mistral's own benchmarks show it outperforming Gemma 3 and GPT-4o Mini, but I haven't seen confirmation from external benchmarks.&lt;/p&gt;
&lt;p&gt;Despite their mention of a 32GB MacBook I haven't actually seen any quantized GGUF or MLX releases yet, which is a little surprising since they partnered with Ollama on launch day for their previous Mistral Small 3. I expect we'll see various quantized models released by the community shortly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; 20th March 2025: I've now run the text version on my laptop using &lt;a href="https://huggingface.co/mlx-community/Mistral-Small-3.1-Text-24B-Instruct-2503-8bit"&gt;mlx-community/Mistral-Small-3.1-Text-24B-Instruct-2503-8bit&lt;/a&gt; and &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm mlx download-model mlx-community/Mistral-Small-3.1-Text-24B-Instruct-2503-8bit -a mistral-small-3.1
llm chat -m mistral-small-3.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The model can be accessed via Mistral's &lt;a href="https://docs.mistral.ai/api/"&gt;La Plateforme API&lt;/a&gt;, which means you can use it via my &lt;a href="https://github.com/simonw/llm-mistral"&gt;llm-mistral&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;Here's the model describing &lt;a href="https://static.simonwillison.net/static/2025/two-pelicans.jpg"&gt;my photo of two pelicans in flight&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-mistral
# Run this if you have previously installed the plugin:
llm mistral refresh
llm -m mistral/mistral-small-2503 'describe' \
  -a https://static.simonwillison.net/static/2025/two-pelicans.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;The image depicts two brown pelicans in flight against a clear blue sky. Pelicans are large water birds known for their long bills and large throat pouches, which they use for catching fish. The birds in the image have long, pointed wings and are soaring gracefully. Their bodies are streamlined, and their heads and necks are elongated. The pelicans appear to be in mid-flight, possibly gliding or searching for food. The clear blue sky in the background provides a stark contrast, highlighting the birds' silhouettes and making them stand out prominently.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I &lt;a href="https://github.com/simonw/tools/commit/f528e115e3fc487e3f5c5435d7cc04dd7314dd91"&gt;added Mistral's API prices&lt;/a&gt; to my &lt;a href="https://tools.simonwillison.net/llm-prices"&gt;tools.simonwillison.net/llm-prices&lt;/a&gt; pricing calculator by pasting screenshots of &lt;a href="https://mistral.ai/products/la-plateforme#pricing"&gt;Mistral's pricing&lt;/a&gt; tables &lt;a href="https://claude.ai/share/a9313f0d-274c-48d2-9d77-346fe68556a5"&gt;into Claude&lt;/a&gt;.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mistral"&gt;mistral&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="ai-assisted-programming"/><category term="llm"/><category term="mistral"/><category term="vision-llms"/><category term="mlx"/><category term="llm-release"/></entry><entry><title>mlx-community/OLMo-2-0325-32B-Instruct-4bit</title><link href="https://simonwillison.net/2025/Mar/16/olmo2/" rel="alternate"/><published>2025-03-16T03:30:41+00:00</published><updated>2025-03-16T03:30:41+00:00</updated><id>https://simonwillison.net/2025/Mar/16/olmo2/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://huggingface.co/mlx-community/OLMo-2-0325-32B-Instruct-4bit"&gt;mlx-community/OLMo-2-0325-32B-Instruct-4bit&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
OLMo 2 32B &lt;a href="https://simonwillison.net/2025/Mar/13/ai2/"&gt;claims to be&lt;/a&gt; "the first fully-open model (all data, code, weights, and details are freely available) to outperform GPT3.5-Turbo and GPT-4o mini". Thanks to the MLX project here's a recipe that worked for me to run it on my Mac, via my &lt;a href="https://github.com/simonw/llm-mlx"&gt;llm-mlx&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;To install the model:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-mlx
llm mlx download-model mlx-community/OLMo-2-0325-32B-Instruct-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That downloads 17GB to &lt;code&gt;~/.cache/huggingface/hub/models--mlx-community--OLMo-2-0325-32B-Instruct-4bit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To start an interactive chat with OLMo 2:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm chat -m mlx-community/OLMo-2-0325-32B-Instruct-4bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or to run a prompt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m mlx-community/OLMo-2-0325-32B-Instruct-4bit 'Generate an SVG of a pelican riding a bicycle' -o unlimited 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;-o unlimited 1&lt;/code&gt; removes the cap on the number of output tokens - the default for &lt;code&gt;llm-mlx&lt;/code&gt; is 1024 which isn't enough to attempt to draw a pelican.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://gist.github.com/simonw/53f00731d494439d4aeca6bdd55368ca"&gt;pelican it drew&lt;/a&gt; is refreshingly abstract:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Blue and black wiggly lines looking more like a circuit diagram than a pelican riding a bicycle" src="https://static.simonwillison.net/static/2025/olmo2-pelican.jpg" /&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/awnihannun/status/1900408729268609309"&gt;@awnihannun&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm"&gt;llm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai2"&gt;ai2&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/olmo"&gt;olmo&lt;/a&gt;&lt;/p&gt;



</summary><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="llm"/><category term="mlx"/><category term="pelican-riding-a-bicycle"/><category term="ai2"/><category term="olmo"/></entry><entry><title>Notes on Google's Gemma 3</title><link href="https://simonwillison.net/2025/Mar/12/gemma-3/" rel="alternate"/><published>2025-03-12T16:15:19+00:00</published><updated>2025-03-12T16:15:19+00:00</updated><id>https://simonwillison.net/2025/Mar/12/gemma-3/</id><summary type="html">
    &lt;p&gt;Google's Gemma team released an impressive new model today (under their not-open-source &lt;a href="https://ai.google.dev/gemma/terms"&gt;Gemma license&lt;/a&gt;). Gemma 3 comes in four sizes - 1B, 4B, 12B, and 27B - and while 1B is text-only the larger three models are all multi-modal for vision:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Gemma 3 introduces multimodality, supporting vision-language input and text outputs. It handles context windows up to 128k tokens, understands over 140 languages, and offers improved math, reasoning, and chat capabilities, including structured outputs and function calling.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here's the &lt;a href="https://storage.googleapis.com/deepmind-media/gemma/Gemma3Report.pdf"&gt;Gemma 3 Technical Report PDF&lt;/a&gt;, which makes the big claim that they find "Gemma3-27B-IT comparable to Gemini-1.5-Pro across
benchmarks".&lt;/p&gt;
&lt;p&gt;I tried out the largest model using the latest &lt;a href="https://ollama.com/"&gt;Ollama&lt;/a&gt; - this is the second time I've spotted a major model release partnering with Ollama on launch day, the first being &lt;a href="https://simonwillison.net/2025/Jan/30/mistral-small-3/"&gt;Mistral Small 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I ran this (after upgrading Ollama through their menu icon upgrade option):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ollama pull gemma3:27b
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That pulled 17GB of model weights. I've been trying it out using &lt;a href="https://llm.datasette.io/"&gt;LLM&lt;/a&gt; and &lt;a href="https://github.com/taketwo/llm-ollama"&gt;llm-ollama&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install llm-ollama
llm -m gemma3:27b 'Build a single page HTML+CSS+JavaScript UI that gives me a large textarea for writing in which constantly saves what I have entered to localStorage (restoring when I reload the page) and displays a word counter'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That was a replay of &lt;a href="https://tools.simonwillison.net/colophon#word-counter.html"&gt;a prompt&lt;/a&gt; I ran against Claude Artifacts a few months ago. Here's &lt;a href="https://static.simonwillison.net/static/2025/gemma3-word-count.html"&gt;what Gemma built&lt;/a&gt;, and the &lt;a href="https://gist.github.com/simonw/f8a87f2242439d3974405a17f5d8bc23"&gt;full chat transcript&lt;/a&gt;. It's a simple example but it worked just right.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://static.simonwillison.net/static/2025/gemma-word-count.gif" alt="Animated demo - a simple textarea, I type text in it and a word count updates above." /&gt;&lt;/p&gt;

&lt;p&gt;Let's try out the vision mode, by asking it to describe this photo:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://static.simonwillison.net/static/2025/two-pelicans.jpg" alt="Two pelicans flying against a blue sky " style="max-width: 100%;" /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m gemma3:27b describe -a https://static.simonwillison.net/static/2025/two-pelicans.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/0e703ba72d0cf5a6dd117981bd03e604"&gt;the full response&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Overall Impression:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The image features two brown pelicans in flight against a solid, bright blue background. The composition is dynamic, capturing the birds mid-wingbeat.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Details:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pelicans:&lt;/strong&gt; Both pelicans are a rich, dark brown color. They have large, pale yellow-orange beaks and pouches. One pelican is shown with its wings fully extended, appearing to be gliding or soaring. The other is captured with its wings in a more dynamic, upward-sweeping motion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background:&lt;/strong&gt; The background is a flat, uniform shade of bright blue, which makes the pelicans stand out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composition:&lt;/strong&gt; The birds are positioned in opposite directions, creating a sense of movement and balance. The image is well-lit, highlighting the texture of the pelicans' feathers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Overall, the image is a striking and visually appealing depiction of these majestic birds in flight.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Is it right to say "the birds are positioned in opposite directions"? I thought that was a mistake at first, but I'll give it a pass since their wings are positioned in opposite directions to each other.&lt;/p&gt;

&lt;p&gt;Something I've been curious about recently is longer context support: how well can a local model on my laptop deal with summarization or data extraction tasks against longer pieces of text?&lt;/p&gt;
&lt;p&gt;I decided to try &lt;a href="https://til.simonwillison.net/llms/claude-hacker-news-themes#user-content-adding-a--m-model-option"&gt;my Hacker News summarize script&lt;/a&gt; using Gemma, against &lt;a href="https://news.ycombinator.com/item?id=43340491"&gt;the thread&lt;/a&gt; there discussing the Gemma 3 technical paper.&lt;/p&gt;
&lt;p&gt;First I did a quick token count (using the OpenAI tokenizer but it's usually a similar number to other models):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl 'https://hn.algolia.com/api/v1/items/43340491' | ttok
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This returned 22,260 - well within Gemma's documented limits but still a healthy number considering just last year most models topped out at 4,000 or 8,000.&lt;/p&gt;
&lt;p&gt;I ran my script like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hn-summary.sh 43340491 -m gemma3:27b
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It did a pretty good job! Here's the &lt;a href="https://gist.github.com/simonw/ab487ea3d1605e719dc2950cd4565146"&gt;full prompt and response&lt;/a&gt;. The one big miss is that it ignored my instructions to include illustrative quotes - I don't know if modifying the prompt will fix that but it's disappointing that it didn't handle that well, given how important direct quotes are for building confidence in RAG-style responses.&lt;/p&gt;
&lt;p&gt;Here's what I got for &lt;a href="https://gist.github.com/simonw/f79c4bd2fbe966e1b600cb8b41cae810"&gt;Generate an SVG of a pelican riding a bicycle&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm -m gemma3:27b 'Generate an SVG of a pelican riding a bicycle'
&lt;/code&gt;&lt;/pre&gt;

&lt;p style="text-align: center"&gt;&lt;img src="https://static.simonwillison.net/static/2025/gemma-3-pelican.svg" alt="A collection of abstract shapes, definitely not a pelican on a bicycle" /&gt;&lt;/p&gt;

&lt;p&gt;You can also try out the new Gemma &lt;a href="https://aistudio.google.com/prompts/new_chat?model=gemma-3-27b-it"&gt;in Google AI Studio&lt;/a&gt;, and via their API. I added support for it to &lt;a href="https://github.com/simonw/llm-gemini/releases/tag/0.15"&gt;llm-gemini 0.15&lt;/a&gt;, though sadly it appears vision mode doesn't work with that API hosted model yet.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;llm install -U llm-gemini
llm keys set gemini
# paste key here
llm -m gemma-3-27b-it 'five facts about pelicans of interest to skunks'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/simonw/bc22062e60e5af3faf458756cb368d0e"&gt;Here's what I got&lt;/a&gt;. I'm not sure how pricing works for that hosted model.&lt;/p&gt;
&lt;p&gt;Gemma 3 is also already available &lt;a href="https://github.com/Blaizzy/mlx-vlm/pull/235"&gt;through MLX-VLM&lt;/a&gt; - here's &lt;a href="https://huggingface.co/collections/mlx-community/gemma-3-67d14a10480a436ad478b0f9"&gt;the MLX model collection&lt;/a&gt; - but I haven't tried that version yet.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemini"&gt;gemini&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vision-llms"&gt;vision-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gemma"&gt;gemma&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="google"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="gemini"/><category term="vision-llms"/><category term="mlx"/><category term="ollama"/><category term="pelican-riding-a-bicycle"/><category term="gemma"/><category term="llm-release"/></entry><entry><title>QwQ-32B: Embracing the Power of Reinforcement Learning</title><link href="https://simonwillison.net/2025/Mar/5/qwq-32b/" rel="alternate"/><published>2025-03-05T21:10:28+00:00</published><updated>2025-03-05T21:10:28+00:00</updated><id>https://simonwillison.net/2025/Mar/5/qwq-32b/</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://qwenlm.github.io/blog/qwq-32b/"&gt;QwQ-32B: Embracing the Power of Reinforcement Learning&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
New Apache 2 licensed reasoning model from Qwen:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We are excited to introduce QwQ-32B, a model with 32 billion parameters that achieves performance comparable to DeepSeek-R1, which boasts 671 billion parameters (with 37 billion activated). This remarkable outcome underscores the effectiveness of RL when applied to robust foundation models pretrained on extensive world knowledge.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I had a lot of fun &lt;a href="https://simonwillison.net/2024/Nov/27/qwq/"&gt;trying out&lt;/a&gt; their previous QwQ reasoning model last November. I demonstrated this new QwQ in &lt;a href="https://simonwillison.net/2025/Mar/8/nicar-llms/#llms.027.jpeg"&gt;my talk at NICAR&lt;/a&gt; about recent LLM developments. Here's &lt;a href="https://gist.github.com/simonw/46cd83701868d364f4cfb1340f0f7fa5"&gt;the example I ran&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;LM Studio just &lt;a href="https://huggingface.co/lmstudio-community/QwQ-32B-GGUF/tree/main"&gt;released GGUFs&lt;/a&gt; ranging in size from 17.2 to 34.8 GB. MLX have compatible weights published in &lt;a href="https://huggingface.co/mlx-community/QwQ-32B-3bit"&gt;3bit&lt;/a&gt;, &lt;a href="https://huggingface.co/mlx-community/QwQ-32B-4bit"&gt;4bit&lt;/a&gt;, &lt;a href="https://huggingface.co/mlx-community/QwQ-32B-6bit"&gt;6bit&lt;/a&gt; and &lt;a href="https://huggingface.co/mlx-community/QwQ-32B-8bit"&gt;8bit&lt;/a&gt;. Ollama &lt;a href="https://ollama.com/library/qwq"&gt;has the new qwq&lt;/a&gt; too - it looks like they've renamed the previous November release &lt;a href="https://ollama.com/library/qwq:32b-preview-q8_0"&gt;qwq:32b-preview&lt;/a&gt;.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/alibaba_qwen/status/1897361654763151544"&gt;@alibaba_qwen&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/local-llms"&gt;local-llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/qwen"&gt;qwen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mlx"&gt;mlx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ollama"&gt;ollama&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-reasoning"&gt;llm-reasoning&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llm-release"&gt;llm-release&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lm-studio"&gt;lm-studio&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-in-china"&gt;ai-in-china&lt;/a&gt;&lt;/p&gt;



</summary><category term="open-source"/><category term="ai"/><category term="generative-ai"/><category term="local-llms"/><category term="llms"/><category term="qwen"/><category term="mlx"/><category term="ollama"/><category term="llm-reasoning"/><category term="llm-release"/><category term="lm-studio"/><category term="ai-in-china"/></entry></feed>