Fazal Majid's low-intensity blog

Sporadic pontification

Fazal

Llama-bench on some consumer-grade AI hardware

I have been on a bender this weekend experimenting with various LLM-capable machines in my homelab, specially the very capable yet fast Qwen3.6-35B-A3B. I haven’t found good benchmarks, though, so I ran the small Gemma4 E4B Q4_K model (4.62 GiB, 7.52B params) using llm-bench. This has two measures: prompt processing 512 (pp512) is how quickly in tokens/second the LLM can read a 512-token prompt, i.e. how good the LLM is at “reading”, and token generation 128 (tg128) is how quickly it can write 128 tokens’ worth of text, i.e. how fast it is at answering the question.

Hostname Backend pp512 t/s tg128 t/s Machine
xhystos ROCm 291.48 6.65 AMD Ryzen AI 7 350 Krackan Point 32GB
utumno Metal,BLAS 1172.93 69.73 Mac Studio M1 Ultra 128GB
ai-x1-pro ROCm 568.54 21.16 AMD AI 9 HX 370 Strix Point 96GB
dgx1 CUDA 3633.84 59.42 NVIDIA DGX Spark 128GB
zanzibar CUDA 1831.78 51.92 NVIDIA A2000 12GB

(click on the hostnames to get the raw report)

The Mac Studio performs very well at token generation, despite being a 4 year old machine, but perhaps that reflects how Llama.cpp is particularly optimized for Apple Silicon. I was also surprised at how strong the performance of the A2000 is, despite it being a fairly weak low-power graphics card meant for 2D CAD in small form-factor workstations like my HP Z2 Mini G9 where it lives. Conversely, the Strix Point performance is underwhelming, even if subjectively it performs reasonably well with Qwen 3.

Dardenne dark milk chocolate praliné

It’s been a while since I last did a chocolate review. There are not many bars that can claim to be made using a patented process invented by a Nobel laureate. The Dardenne Lait Praliné (dark milk chocolate with ground hazelnuts) is one.

The special cooking process was invented in 1910 by Paul Sabatier (Chemistry Nobel, 1912) to make chocolate easier to digest for people who don’t tolerate it well. In any case, this is an organic and Fairtrade bar with a moderately high 43% cacao content (for milk chocolate).

The bar is not too sweet, and as expected has a strong chocolate taste. The texture is mostly smooth like a milk gianduia, but you can feel an ever so slightly grainy feel, as if the hazelnuts were not ground finely enough or the chocolate not sufficiently conched. Despite this minor flaw, this is an excellent bar that is relatively inexpensive for organic chocolate. The only drawback is, it may be difficult to source outside France.

Moving away from Apple platforms, a living diary

TL:DR A living diary of how I am slowly moving away from Apple

My first computer was an Apple ][+ in 1981. The first computer I purchased with my own money was a Mac Plus, circa 1990. Then I discovered Linux in 1991 and switched. When Apple introduced Mac OS X, I purchased an iMac G4, and over time transitioned fully to the new UNIX-based Mac. I also got the first iPod, iPhone and iPads, so I could fairly be accused of being an Apple fanboi, even if I have never been blind to the platform’s limitation and Apple’s questionable business practices.

Over the last year and more, I have been souring over Apple as a platform and a company:

  • Their software quality, never particularly high (even if Microsoft made them look good in comparison), has tanked since they fired Scott Forstall. I am not even sure whether they are any better than Microsoft at this point.
  • Their need to eke out growth from a maturing smartphone and PC business means they are incredibly rapacious with the App Store tax, and pushing developers towards user-hostile business models like subscription pricing.
  • Their claim to privacy leadership was always more marketing than reality, but is now in tatters, see my previous article on how to circumvent their tracking (not always possible, e.g. notarization).
  • Their extortionate pricing on RAM and storage has grown impossible to ignore.
  • Their constant self-shilling for useless services like Apple News or Apple Fitness in the UI makes a mockery of their claim to provide a superior user experience.

So what is to be done? I am working to switch to Ubuntu and CachyOS Linux on the desktop and laptops (I still use Alpine Linux on servers), and to GrapheneOS, a degoogled and highly secure fork of Android. To this end, I purchased a few laptops to run Linux as a daily driver (Asus Vivobook S and Lenovo Thinkpad E16 G3), a Google Pixel 8 Pro and Google Pixel Tablet. I also have a Beelink GTR9 Pro on order (running the AMD Strix Halo Ryzen AI Max+ 395 processor) to be the twin and successor to my Mac Studio.

I carry both my iPhone 16+ and the Pixel with me at all times, and force myself to use the GrapheneOS device first, and only fall back to the iPhone if all else fails, which indicates which functionality I need to migrate next.

The rest of this article is a living diary of the migration and what software I am using as a replacement, and I will update it as I progress.

iOS and iPadOS to GrapheneOS

Of course, many apps are cross-platform and migrating is straightforward.

It’s annoying that Signal and WhatsApp don’t allow you to run the same account concurrently on two phones, a vestige of their original sin, i.e. basing identity on the rotten foundation of the Public Switched Telephone Network.

Upcoming:

  • Things (to do list manager): I couldn’t find what I wanted so I vibe-coded a PWA using Claude: Thufir, although it is still quite janky.
  • Apple Pay: there are reports Curve Pay works on GrapheneOS.
  • Backups: I set up nginx as a WebDAV server for Seedvault, but it is not yet reliable.
  • Signing PDFs on an iPad: no solution in sight.
  • CarPlay: my 2020 Mini Cooper Electric only supports CarPlay and not Android Auto, so I am stuck.

macOS to Linux

Upcoming:

  • Scanning: probably SANE.
  • Desktop publishing: either back to LaTeX or Typst, though neither is WYSIWYG.
  • Quick Look: no equivalent that I know of, I certainly miss this.
  • Finder column view: no equivalent either.
  • Affinity Publisher: TBD

Making the LEDs on the LincStation N2 work in Alpine

TL:DR A daemon to handle the LEDs on the LincStation N2 NAS

I normally run backups on my network on a SmartOS server equipped with 2x14TB mirrored hard drives running ZFS, using rsync and SMB/CIFS as the access protocol (and eventually Kopia). It’s a bit noisy and sluggish, despite having a 10G Ethernet connection, so I recently bought a LincPlus LincStation N2 all-flash server during its Kickstarter to eventually replace it.

The N2 is a very slim device, has 10G (copper) networking, supports 4x M2 SSDs plus 2x SATA 2.5" drives (I suppose they could be spinning rust) and a 128G MMC boot drive so you don’t have to waste data drives on the operating system. The only thing missing, really, is ECC memory.

It is supplied with a trial version of the semi-open Unraid OS, which I suppose is better than the proprietary QNAP QuTS Hero OS or the execrable btrfs-based Synology OS (Synology is beyond the pale because they are going to force their NAS appliance users to use only their own-branded and marked-up hard drives).

I know how to run a Linux system and I don’t need the limitations and hand-holding of a NAS appliance OS, so being able to install my OS of choice, in this case Alpine Linux, was non-negotiable. I managed to, after some fiddling because the device does not honor the BIOS boot settings or even boot off a USB drive until you physically remove the Unraid USB drive plugged into the first M.2 bay using pliers.

Once Alpine was installed, it was fairly smooth sailing, while the 4x4TB Lexar NM790 SSDs are throttled by only one PCIe lane each due to the limitations of the Intel N100, it’s still plenty good enough to saturate the 10Gbps Ethernet connection. My main home server (HP Z2 Mini G4) took this opportunity to die after 6 years of loyal service and the interim replacement I put in place only has 1Gbps, you can feel the difference. I have a Lenovo ThinkStation P3 Ultra on order as a permanent replacement, the only current SFF workstation available with both ECC RAM and 10G Ethernet.

One thing I noticed, however, is that all the status LEDs on the front kept flashing instead of doing so only when a drive or the network sees activity. To make this extra annoying, they are in my peripheral view in my home office. Peripheral vision is of course extremely sensitive to flicker and movement, survival traits when our ancestors in the savanna needed to be on the lookout for predators sneakily approaching. I had to do something about it.

On investigating, it seems they are SMBus devices controlled in closed-source software included on the Unraid flash drive, but also readily available on GitHub. Some reverse-engineering with strace and Hopper Disassembler showed it is written in Go, and constantly spawning subprocesses using the i2c-tools i2cget and i2cset commands, which is quite inefficient.

I first rigged up a simple shell script to just turn off all the LEDs:

#!/bin/sh
# https://gist.github.com/aluevano/ca6431f4f15d8ea62df57e67df7d4c3d

# SATA 1
i2cset -y 11 0x26 0xB0 0x04 # white off
i2cset -y 11 0x26 0xB0 0x08 # red off 
i2cset -y 11 0x26 0x52 0x00 # blinking off

# SATA 2
i2cset -y 11 0x26 0xB0 0x10 # white off
i2cset -y 11 0x26 0xB0 0x20 # red off 
i2cset -y 11 0x26 0x54 0x00 # blinking off

# Network
i2cset -y 11 0x26 0xB0 0x40 # white off
i2cset -y 11 0x26 0xB0 0x80 # red off 
i2cset -y 11 0x26 0x56 0x00 # blinking off

# NVMe 1
i2cset -y 11 0x26 0xB1 0x01 # white off
i2cset -y 11 0x26 0xB1 0x02 # red off 
i2cset -y 11 0x26 0x58 0x00 # blinking off

# NVMe 2
i2cset -y 11 0x26 0xB1 0x04 # white off
i2cset -y 11 0x26 0xB1 0x08 # red off
i2cset -y 11 0x26 0x5A 0x00 # blinking off

# NVMe 3
i2cset -y 11 0x26 0xB1 0x10 # white off
i2cset -y 11 0x26 0xB1 0x20 # red off
i2cset -y 11 0x26 0x5C 0x00 # blinking off

# NVMe 4
i2cset -y 11 0x26 0xB1 0x40 # white off
i2cset -y 11 0x26 0xB1 0x80 # red off
i2cset -y 11 0x26 0x5E 0x00 # blinking off

But this is throwing the baby with the bath water, and losing status indications. I decided to write my own replacement for the LincPlus LED daemon. To save time writing tedious C boilerplate, I asked Claude to write it for me (so am I a systems vibe coder now?). The prompts were:

  1. Using the docs at https://gist.github.com/aluevano/ca6431f4f15d8ea62df57e67df7d4c3d as a guide, write a program in C that uses SMBus/I2C to set LEDs based on disk utilization on sda, sdb, nvme0n1, nvme1n1, nvme2n1, nvme3n1 and network activity
  2. Set MAX_I2C_BUS to a higher value, on my system, the bus found is 11
  3. Use SMBus calls rather than plain I2C whenever possible

Claude did a surprisingly good job. I had to make the following adjustments for it to work properly:

  • Make it use SMBus rather than raw I2C calls to check if the bus supports the LincStation LEDs device 0x26 and avoid false positives (done using prompt 3).
  • Change the code to say utilization is 0% and not 100% if io_time is unchanged.
  • Make the network activity check only eth0, if you are running Docker or LXC, there will be other virtual or bridge interfaces that don’t actually generate outside traffic.

The most impressive thing was how it was able to reverse-engineer the gist and infer a structure to the I2C calls.

All in all, this took about 4 hours’ work including the (non AI assisted) research into how the LEDs work and some attempted reverse-engineering of the LincStation daemon using Hopper Disassembler.

Here is the result: https://github.com/fazalmajid/linstation_leds. I will probably have to make some tweaks as the network activity LED is now solidly on, due to background activity on the network.

Paris travel tips

TL:DR Some quick tips for friends & family travelling to Paris

France is the world’s most popular destination for tourism, and its capital is of course the entry point for most visitors. The Paris region has a population of 9 million, but Paris intra muros (Paris within the walls, the deep historical core city within the Périphérique ring road) is only about 2 million.

Driving within Paris proper is a nightmare, and completely unnecessary given the quality of the regional public transit network. Going to suburbs like Versailles or Saint-Germain en Laye is easy, but going from one suburb to another is harder because the public transport network is radial, you often have to go all the way back to Paris to transfer, although the situation is improving.

The CityMapper app is very useful for figuring out the best transit options to your chosen destination. Since 2005, the entire region has a flat €2.50 charge, or €2 if you limit yourself to buses or the Paris Métro (this does not include the airports, for which there is a surcharge). The easiest way to move around is to use the official Île de France Mobilités app, you can load individual tickets or day/week passes onto your phone if it supports NFC as most do nowadays.

Of course, France is renowned for its food and no visit to Paris is complete without sampling its treats. I’ve made a custom map. David Lebovitz’s blog and book The Good Life in Paris is also an excellent resource, and more up-to-date than anything I can produce from afar.

I won’t cover the major tourist attractions, but here are a few off-the-beaten-path ones:

  • The Musée des Arts & Métiers has a wealth of ancient scientific and technical exhibits, like Foucault’s original pendulum, king Louis XIV’s machines (he had a hobby building mechanical machines), Caselli’s Pantelegraph, a 1860s fax machine, and much much more.
  • The Palais Galliéra is a museum dedicated to fashion. It doesn’t have permanent collection, only rotating special exhibitions, and sometimes workshops as well.
  • The Promenade Plantée is the inspiration for New York’s High Line and other imitators. It’s a raised railway viaduct converted into an urban park, and under its arches the Viaduc des Arts houses arts & crafts shops as well as a number of foodie outlets.
  • The Musée de la Magie is a museum devoted to stage magic, in one of the oldest parts of Paris where you can still see the remains of Philippe-Auguste’s fortifications nearby. It has workshops for children on Wednesday, with some coverage in English, but you would be best asking if one of the teachers is proficient first.
  • The Fragonard perfume company has English-language workshops in their flagship store near the Opéra.
  • The Musée des Plans-Reliefs (English brochure) in the majestic Hôtel des Invalides has a unique collection of 3D scale models of cities and fortifications, built for military planning purposes from Louis XIV onwards.
  • Outside Paris in Élancourt, the France Miniature amusement park has scale models of all of France’s top attractions, plus a few more physical activities like ziplines. You do need to drive to get there, however.
  • The Terrasse de Saint-German-en-Laye and the Parc de Saint-Cloud have outstanding views of Paris.
  • Lines for the Eiffel Tower are often very long. The views from the much less crowded Tour Maine Montparnasse are just as good, and as a bonus you can’t see that modernist carbunkle from itself…