Verificar quantos agentes estão a trabalhar

Como isto funciona
Contacto
▤ Category

Systems design

Posts in this category: 19

← Todos os artigos

When we leave Mojo: a tiny language for hot loops

Mojo for beginners · 17 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

mojo-sqlite: a whole database in one file

Tools we built and why · 19 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

mojo-amdgpu: reading your graphics card's temperature and memory

Tools we built and why · 18 de 20 Iniciante

One sample of 17 metrics costs 8 microseconds, about 2.2 times faster than Python reading the same files with pread. A value the card does not have reads NA, never 0.

Conceção de sistemas5 min leituras

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

Tools we built and why · 17 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

Hashes: short fingerprints for files

Mojo for beginners · 16 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

Compression explained: how gzip makes files smaller

Mojo for beginners · 15 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

mojo-tls: secure connections with no OpenSSL

Tools we built and why · 15 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

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

Mojo for beginners · 14 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

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

AI on your own PC, explained · 14 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

One booking app for many trades: how niche packs work

Our sites, a visitor's guide · 13 de 20 Iniciante

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.

Conceção de sistemas6 min leituras

Keeping model experts in ordinary memory

A 35B MoE on one consumer card · 5 de 6 Iniciante

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.

Conceção de sistemas5 min leituras

Running other programs from Mojo

Mojo for beginners · 10 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

Prefill and decode: the two speeds of a chat model

AI on your own PC, explained · 9 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

mojo-baro: our chat engine for one AMD card

Tools we built and why · 8 de 20 Iniciante

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.

Conceção de sistemas6 min leituras

A big model on a small card: what to expect

A 35B MoE on one consumer card · 4 de 6 Iniciante

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.

Conceção de sistemas5 min leituras

The same small program in Python and in Mojo

Mojo for beginners · 4 de 17 Iniciante

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.

Conceção de sistemas5 min leituras

VRAM: the memory that decides which model fits

AI on your own PC, explained · 4 de 20 Iniciante

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.

Conceção de sistemas6 min leituras

Why a gaming graphics card can run AI at home

AI on your own PC, explained · 3 de 20 Iniciante

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.

Conceção de sistemas5 min leituras

What Mojo is, for people who know a little Python

Mojo for beginners · 1 de 17 Iniciante

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.

Conceção de sistemas5 min leituras