Checking how many agents are working

How this works
Contact
▤ Category

Systems design

Posts in this category: 19

← Toate articolele

When we leave Mojo: a tiny language for hot loops

Mojo for beginners · 17 of 17 Beginner

A Goose search ran in 0.79 s against 3.63 s for scipy on 1 million points, but the first version lost in the real pipeline. Splitting the tree build fixed it, and the real saving was 1.4 s on a 30 s job.

Systems design5 min read

mojo-sqlite: a whole database in one file

Tools we built and why · 19 of 20 Beginner

On 200,000 inserts through one prepared statement, Python sqlite3 took 216 to 226 ms and mojo-sqlite took 80 to 82. Every SQL test file must give identical output through both.

Systems design5 min read

mojo-imkit: a simple app window drawn by the GPU

Tools we built and why · 17 of 20 Beginner

Widgets are function calls made every frame and appended to one flat draw list. One GPU kernel turns the list into a picture. The library also decodes PNG, JPEG, WebP and AVIF in pure Mojo.

Systems design5 min read

Hashes: short fingerprints for files

Mojo for beginners · 16 of 17 Beginner

Hash a file with sha256 in Mojo and get the same fingerprint as sha256sum. xxhash ran at 51.6 GB/s on XXH3-64 in our test, while our sha256 is 5.3 times slower than OpenSSL on bulk data.

Systems design5 min read

Compression explained: how gzip makes files smaller

Mojo for beginners · 15 of 17 Beginner

One MiB of the letter A shrank to 1,052 bytes with gzip, the same size Python gives. Repeated patterns are written once, and random data does not shrink at all.

Systems design5 min read

mojo-tls: secure connections with no OpenSSL

Tools we built and why · 15 of 20 Beginner

16.7 thousand lines of Mojo that speak TLS 1.3 and 1.2 as client and server and talk to openssl, Firefox, Chromium and Vivaldi in both directions. It is internally audited, not independently audited.

Systems design5 min read

Memory-mapped files: reading a huge file without loading it

Mojo for beginners · 14 of 17 Beginner

Mapping a file costs almost nothing up front, because the system loads pages only when you touch them. On 50,000 tensors, mojo-safetensors opened a file in 51 ms against 164 s for the Python reference.

Systems design5 min read

What an OpenAI-compatible API means, and why it is handy

AI on your own PC, explained · 14 of 20 Beginner

An OpenAI-compatible API is a shared message format. mojo-baro answers it at /v1/chat/completions, and Yahaai accepts any endpoint that speaks it, so the same chat can reach different models.

Systems design5 min read

One booking app for many trades: how niche packs work

Our sites, a visitor's guide · 13 of 20 Beginner

Build the app once, then describe each trade in a data file. This post explains niche packs, what they hold, what they must never hold, and how we added a repair-ticket mode without forking the code.

Systems design6 min read

Keeping model experts in ordinary memory

A 35B MoE on one consumer card · 5 of 6 Beginner

Our first version of this was correct and slow, 39 tokens a second. Pinning the memory took it to 67.12, and reading missed experts in place took it to 72.02. Output stayed identical on 20 of 20 prompts the whole way.

Systems design5 min read

Running other programs from Mojo

Mojo for beginners · 10 of 17 Beginner

Run echo and sort from Mojo, capture their output, and stop a stuck command with a timeout. run(["true"]) took 418 microseconds against 543 to 1,155 for Python on one busy machine.

Systems design5 min read

Prefill and decode: the two speeds of a chat model

AI on your own PC, explained · 9 of 20 Beginner

Reading all prompt tokens at once ran at 524 to 531 tokens per second at 1k context, against about 67 when we replayed one token at a time. Writing the answer stays one token at a time.

Systems design5 min read

mojo-baro: our chat engine for one AMD card

Tools we built and why · 8 of 20 Beginner

On matched Q4_0 weights mojo-baro decoded Qwythos-9B at 148.89 tokens per second against llama.cpp at 111.34, a 1.34 times ratio measured on Mojo 1.1.0. On Mojo 1.2 one path got slower, and we say so.

Systems design6 min read

A big model on a small card: what to expect

A 35B MoE on one consumer card · 4 of 6 Beginner

A 35 billion parameter model has a 21 GB weight pack and our card holds 24 GB. Keeping the experts in ordinary RAM cut the card's load to 2.68 GB and kept the output identical, at 72 tokens a second instead of 112.

Systems design5 min read

The same small program in Python and in Mojo

Mojo for beginners · 4 of 17 Beginner

A sum loop and a command-line parser, each in both languages. The layout is the same, and the changes are types, var, main and an up-front compile step.

Systems design5 min read

VRAM: the memory that decides which model fits

AI on your own PC, explained · 4 of 20 Beginner

A 21 GB model on a 24 GB card fits, barely. Add a long chat or a desktop and it does not. We show the sums with our own numbers, including a 14.74 GB leak that hid in plain sight.

Systems design6 min read

Why a gaming graphics card can run AI at home

AI on your own PC, explained · 3 of 20 Beginner

A graphics card is a crowd of small workers. One RX 7900 XTX with 24 GB held a 27B model at 17.0 GB peak, but a 21 GB model left almost no room for anything else.

Systems design5 min read

What Mojo is, for people who know a little Python

Mojo for beginners · 1 of 17 Beginner

Mojo looks like Python but you add types and compile it. In our libraries it parses command lines 13 times faster than argparse, yet it still loses to OpenSSL on bulk sha256 hashing.

Systems design5 min read