Technology Mag Things

All About Technology

Breaking

Sunday 28 April 2024

April 28, 2024

AI Can Now Compress Text

There are many claims in the air about the capabilities of AI systems, as the technology continues to ascend the dizzy heights of the hype cycle. Some of them are true, others stretch definitions a little, while yet more cross the line into the definitely bogus. [J] has one that is backed up by real code though, a compression scheme for text using an AI, and while there may be limitations in its approach, it demonstrates an interesting feature of large language models.

The compression works by assuming that for a sufficiently large model, it’s likely that many source texts will exist somewhere in the training. Using llama.cpp it’s possible to extract the tokenization information of a piece of text contained in its training data and store that as the compressed output. The decompressor can then use that tokenization data as a series of keys to reassemble the original from its training. We’re not AI experts but we are guessing that a source text which has little in common with any training text would fare badly, and we expect that the same model would have to be used on both compression and decompression. It remains a worthy technique though, and no doubt because it has AI pixie dust, somewhere there’s a hype-blinded venture capitalist who would pay millions for it. What a world we live in!

Oddly this isn’t the first time we’ve looked at AI text compression.



April 28, 2024

Hack In Style With This Fallout Cyberdeck

There’s always an appeal to a cool-looking computer case or cyberdeck – and with authentic-looking Vault-Tec style, [Eric B] and [kc9psw]’s fallout-themed cyberdeck is no exception.

The case looks like it came straight out of one of the Fallout games and acts the part: while (obviously) not capable of withstanding a direct nuclear bomb impact, it can protect the sensitive electronics inside from the electromagnetic pulse and shockwave that follows – if you keep it closed.

And it’s not just the case that’s cool: This cyberdeck is packed full of goodies like long-range radios, SDRs, ADSB receivers, a Teensy 4.1, and dual Raspberry Pis. But that’s just the hardware! It also comes with gigabytes upon gigabytes of Wikipedia, Wikihow, TED talks, and other information/entertainment, for the less eventful days in the wastelands.

If you, too, would like to have one, fret not! The parts list and design files are public, even though some assembly is required.



April 28, 2024

Hackaday Links: April 28, 2024

Hackaday Links Column Banner

Well, it’s official — AI is ruining everything. That’s not exactly news, but learning that LLMs are apparently being used to write scientific papers is a bit alarming, and Andrew Gray, a librarian at University College London, has the receipts. He looked at a cross-section of scholarly papers from 2023 in search of certain words known to show up more often in LLM-generated text, like “commendable”, “intricate”, or “meticulous”. Most of the words seem to have a generally positive tone and feel a little fancier than everyday speech; one rarely uses “lucidly” or “noteworthy” unless you’re trying to sound smart, after all. He found increases in the frequency of appearance of these and other keywords in 2023 compared to 2022, when ChatGPT wasn’t widely available.

It doesn’t always take a statistical analysis of word distributions to detect the footprints of an LLM, though. The article includes examples of text copied and pasted directly from the chatbot, without any attempt at editing or even basic proofreading. How not only the authors of the papers but also the journal editors and reviewers managed not to pick up an obvious chatbot error message that had been copy-pasted is hard to imagine. And let’s not even get started on the Midjourney-generated diagram of a monstrously well-endowed rat that was used to illustrate an article (since retracted) on spermatogenesis, complete with nonsensical captions and callouts to non-existent body parts. This is why we can’t have nice things.

Speaking of nice things, did you know that the largest manufacturer of vintage lamps in history is a little company called “Underwriter’s Laboratory”? At least it seems that way looking at eBay, where sellers listing old lamps often claim the manufacturer is the storied safety standards organization. We suppose it makes sense if the only label on an old lamp is the UL listing label and you had no idea what UL is. But really, that’s the least of the problems with some of these listings. “Vintage” is a stretch for a green banker’s lamp with a polarized plug that was clearly made sometime in the last 30 years.

Switching gears a bit, it’s one thing to know that everything you do online is tracked, but it’s quite another thing to find out exactly how much information is shooting back and forth between your computer and the Hive Mind. That’s what Bert Hubert built Tracker Beeper to do, and it’s a little terrifying. The tool emits a short beep every time your computer sends off a bit of data to a tracker. It started just monitoring data going to Google, which was alarming enough. The tool was later modified to include most of the trackers we’re likely to come across in our daily travels, and wow! It sounds like a Geiger counter when the tube gets saturated by a highly active source. Probably just as dangerous, too.

Heads up — the HOPE conference is gearing up. Hackers on Planet Earth XV will be held July 12-14 on the campus of St. John’s University in Queens, New York. The “Call for Participation” is now open; it’s always nice to see a big Hackaday contingent at HOPE, so make sure you get your proposals for talks, workshops, or panels together soon.

And finally, what should you do if the FCC comes knocking at your door? It’s not just an academic question; the US Federal Communications Commission does a lot of field investigation, and if you do any kind of RF experimentation, there’s a non-zero chance that you’ll make some kind of spurious emission that gets their attention. Josh from Ham Radio Crash Course dropped a video that addresses the dreaded knock. TL;DW — come back with a warrant. But it’s more complicated than that, as illustrated by a hilarious IRL account of one such encounter. We won’t spoil the surprise, but suffice it to say that if your house is under the approach to a major international airport, you probably want to be extra careful with anything radio-related.



April 28, 2024

You Can Run BASIC On an Old HP 4592 Protocol Analyzer

What do you do when you find an ancient piece of test gear and want to have fun? Well, you can always try getting BASIC running on it, and that’s precisely what [David Kuder] did.

The HP4952A Protocol Analyzer actually looks a lot like an old computer, even if it was never meant for general-purpose use. The heart of the machine is a Zilog Z80 CPU, though, so it shares a lot in common with microcomputers of its era.

Among other hacks, [David] worked to get Microsoft Basic-80 running on the machine. Initially, he was only able to get it up and running on the display, with no way to read the keyboard, disk, or access the serial port. Eventually, by diving into the nitty-gritty of the machine, he was able to at least get the keyboard working along with some basic BASIC programs. Usable memory is just 8KB, but you can do a fair bit with that when you’ve only got a 32×16 display for output anyway!

It’s a neat hack and one that was extendable to the HP4957A as well. We’ve seen similar machines on these pages before, too! If you’ve got your own neat retro hacks on the boil, don’t hesitate to drop us a line!

[Thanks to Christopher Zell for the tip!]



April 28, 2024

Train a GPT-2 LLM, Using Only Pure C Code

[Andrej Karpathy] recently released llm.c, a project that focuses on LLM training in pure C, once again showing that working with these tools isn’t necessarily reliant on sprawling development environments. GPT-2 may be older but is perfectly relevant, being the granddaddy of modern LLMs (large language models) with a clear heritage to more modern offerings.

LLMs are fantastically good at communicating despite not actually knowing what they are saying, and training them usually relies on PyTorch deep learning library, itself written in Python. llm.c takes a simpler approach by implementing the neural network training algorithm for GPT-2 directly. The result is highly focused and surprisingly short: about a thousand lines of C in a single file. It is a highly elegant process that does the same thing the bigger, clunkier methods accomplish. It can run entirely on a CPU, or it can take advantage of GPU acceleration, where available.

This isn’t the first time [Andrej Karpathy] has bent his considerable skills and understanding towards boiling down these sorts of concepts into bare-bones implementations. We previously covered a project of his that is the “hello world” of GPT, a tiny model that predicts the next bit in a given sequence and offers low-level insight into just how GPT (generative pre-trained transformer) models work.



Saturday 27 April 2024

April 27, 2024

Pi Pico Gets a ZX Spectrum Emulator

The Pi Pico is a capable microcontroller that can do all kinds of fun and/or useful things. In the former vein, [antirez] has ported a ZX Spectrum emulator to the Pi Pico.

ZX2040, as it is known, is a port of [Andre Weissflog’s] existing ZX spectrum emulator. It’s designed for use on the compact embedded Pi Pico platform, using ST77xx TFT displays. To that end, it has a UI optimized for small, low resolution screens and minimal buttons. After all, very few Pi Picos come with a full QWERTY keyboard attached.

Certain hacks are necessary to make it all work; the chip is overclocked to get things humming fast enough. The emulator also runs upscaling or downscaling in realtime as needed. This allows the emulator to run with a variety of displays, almost none of which are a direct match for the ZX Spectrum’s original resolution of 256×192 pixels.

Code is on Github for the curious, including a great run down from [antirez] on everything that makes it tick. If you want to play ZX Spectrum games on a keychain, you’d do well to start here. There are other projects to emulate it on the Pico, too! Video after the break.



April 27, 2024

Wine in Beverage Cans Had a Rotten Egg Problem, Until Now

Aluminum beverage cans are used for all kinds of drinks, but when it comes to wine there are some glitches. Chief among them is the fact that canned wine occasionally smelled like rotten eggs. Thankfully, researchers have figured out why that happens, and how to stop it. How was this determined? As the image above hints at, lots and lots of samples and testing.

What causes this, and why don’t other beverages have this problem? Testing revealed that the single most important factor was the presence of molecular sulfur dioxide (SO2), a compound commonly used in winemaking as an antioxidant and antimicrobial.

It turns out that the thin plastic lining on the inside of beverage cans doesn’t fully stop molecular SO2 from reacting with the surrounding aluminum, creating hydrogen sulfide (H2S) in the process. H2S has a very noticeable rotten egg smell, even in low concentrations.

Researchers discovered that if a canned beverage contained more than 0.5 ppm of molecular SO2, a noticeable increase in hydrogen sulfide was likely to be present within four to eight months. The problem is that since most wines aim for around 0.5 ppm of SO2, the average can on wine sitting on a shelf will have a problem sooner rather than later. The more SO2 in the wine (reds tend to contain less, whites more), the worse the problem.

Simply increasing the thickness of the plastic liner is an imperfect solution since it increases manufacturing costs as well as waste. So, researchers believe the right move is to use a more durable liner formulation combined with a lower SO2 concentration than winemakers are usually comfortable with. Unlike bottles, cans can be hermetically sealed which should offset the increased oxidation risk of using a lower concentration of SO2. The result should be wine as a canned beverage, with a shelf life of at least 8 months.

The research is published here and gives a great look at just how one approaches this kind of scientific problem, as well as highlighting just how interesting the humble aluminum beverage can really is.