BitTorrent For Language Models

In the old days of the Internet, FTP was sufficient for downloading the occasional file. But with the widespread use of computer audio and video, it was easy to swamp an FTP server so — eventually — BitTorrent was born. The idea was you would download bits and pieces of a file from different places and, in theory, people would download bits and pieces that you have if they need them. Now Petals wants to use this same method with language models. These AI language models are all the rage, but they take significant computer resources. The idea behind Petals is like BitTorrent. You handle a small part of the model (about 8 gigabytes which is small compared to the 352 gigabytes required), and other people have other parts.

Of course, if you are privacy-minded, that means that some amount of your data is going out to the public, but for your latest chatbot experiments, that might not be a big problem. You can install Petals in an Anaconda environment or run a Docker image if you don’t want to set up anything. If you just want to access the distributed network’s chatbot based on BLOOMZ-176B, you can do that online.

Continue reading “BitTorrent For Language Models”

Cold War Listening Post Antennas

With a UHF antenna, it is easy to rotate a directional antenna to find the bearing to a transmitter. But at HF, it is more common to use an array of antennas that you can electrically switch as well as analyze the phase information between the elements. [Ringway Manchester] has a look at the “elephant cage” antenna used by the US Iron Horse listening network from the 1950s. You can see a video about the giant antenna system, the AN/FLR-9.

Technically, the ring of concentric antenna elements forms a Wullenweber antenna. The whole thing consists of three rings built on a ground screen nearly 1,500 feet across. The outer ring covers from 1.5 to 6 MHz or band A. The band B ring in the center covers 6 to 18 MHz. The inner ring covers band C which was from 18 to 30 MHz.  Band A was made up of 48 monopoles while band B used 96 elements. The much smaller band C elements were 48 pairs of horizontally polarized dipoles. Continue reading “Cold War Listening Post Antennas”

Advanced 3D Printing Tips

One of the best things about hanging around with other hackers is you hear about the little tricks they use for things like 3D printing. But with the Internet, you can overhear tips from people you’ll probably never meet, like [3D Printer Academy]. His recent video has a little bit of a click-bait title (“10 Secret 3D Printing Tricks…“) but when we watched it, we did see several cool ideas. Of course, you probably know at least some of the ten tips, but it is still interesting to see what he’s been up to, which you can do in the video below.

At one point he mentions 11 tips, but the title has 10 and we had to stretch to get to that number since some of them have some overlap. For example, several involve making printed threads. However, he also shows some C-clips, a trick to add walls for strength, and printing spur gears. Of course, some of these, like the gears, require specific tools, but many of them are agnostic.

Some of the tips are about selecting a particular infill pattern, which you’d think would be pretty obvious, but then again, your idea of what’s novel and what’s old hat might be different than ours. The explanation of how a print-in-place hinge works is pretty clear (even if it isn’t really a live hinge) and also applies to making chains to transfer power. We also thought the threaded containers were clever.

So if you can overlook the title and you don’t mind seeing a few tips you probably already know, you can probably take something away from the video. What’s your favorite “expert” trick? Let us know in the comments.

A lot of what we print tends to be enclosures and there are some good tips for those floating around. Of course, the value of tips vary based on your experience level. But if you are just starting out, you should check out [Bald Engineer]’s video of things he wished someone had told him when he started 3D printing.

Continue reading “Advanced 3D Printing Tips”

Coffee Grinder Gets Bluetooth Weighing

Some people take their coffee grinding seriously. So what do you do when the hot new grinders automatically weigh coffee, and yours doesn’t? Well, if you are like [Tech Dregs] and the rest of us, you hack your existing grinder, of course. The link is to the source code, but for a quick overview, check out the video below.

In true hacker fashion, the first order of business was to pull a load cell out of a cheap scale. Originally, he intended to reuse the processor inside, too, but it was epoxied, so it was a good excuse to use some more modules. A load cell amplifier, an OLED display, and a tiny Xiao processor, which he describes as “ridiculous.” From the context, we think he means ridiculously small in the physical sense and ridiculously powerful for such a tiny board.

With the modules, the wiring wasn’t too hard, but you still need some kind of app. Thanks to App Inventor, an Android app was a matter of gluing some blocks together in a GUI. Of course, the devil is in the details, and it took a lot of “focused cursing” to get everything working correctly.

The coffee grinder has a relay to turn the motor on and off, so that’s the point the scale needs to turn the motor on and off. Conveniently, the grinder’s PCB had an unpopulated pin header for just this purpose.

This is one of those simple projects you can use daily if you drink coffee. We are always impressed that the infrastructure exists today and that you can throw something like this together in very little time without much trouble.

WiFi hacking coffee makers is a popular Java project in these parts. Upgrading a machine can get pretty serious with PID control loops and more.

Continue reading “Coffee Grinder Gets Bluetooth Weighing”

Replacing A Clock IC’s Battery

You can find a lot of strange things inside IC packages. For example, the Dallas DS12885 and DS12887 real time clock “chips” were available in a large package with an internal battery. The problem, of course, is that batteries die. [New Old Computer Show] wanted to restore a machine that used one of these devices and was able to repair the device. You can see two videos below. In the first video, he replaces both the battery and adds an external oscillator which would be necessary for the DS12885. However, he actually had the DS12887, which has an internal oscillator, something the second video explains.

The repair used a PCB he ordered from Tindie. However, the board is only part of the problem. You also need to disconnect the dead battery which requires a Dremel and a steady hand.

Continue reading “Replacing A Clock IC’s Battery”

Robot Hand Looks And Acts Like The Real Thing

Throughout history, visions of the future included human-looking robots. These days we have plenty of robots, but they don’t look like people. They look like disembodied arms, cars, and over-sized hockey pucks concealing a vacuum cleaner. Of course there’s still demand for humanoid robots like Commander Data, but there are many challenges: eyes, legs, skin, and hands. A company known as Clone may have the solution for that last item. The Clone Hand is “the most human-level musculoskeletal hand in the world,” according to the company’s website.

The 0.75 kg hand and forearm offer 24 degrees of freedom and two hours of battery life. It sports 37 muscles and carbon fiber bones. The muscle fibers can cycle over 650,000 times. You can watch the hand in action in the video below.

There is a hydraulic pump that the company likens in size to a human heart. The hand can also sense for feedback purposes. If you want to build your own, you’ll have to figure it out yourself. The Clone Hand is proprietary, but it does show what is in the art of the possible. The company claims they cost under $3,000, but it isn’t clear if that’s their cost or a projected future retail price.

Of course, human hands aren’t always the perfect robot manipulator. But when you need a realistic hand, you really need it. We see a lot of attempts at realistic hands, and we have to say they are getting better.

Continue reading “Robot Hand Looks And Acts Like The Real Thing”

The X Macro: A Historic Preprocessor Hack

If we told you that a C preprocessor hack dated back to 1968, you’d be within your rights to remind us that C didn’t exist in 1968. However, assemblers with preprocessors did, and where there is a preprocessor, there is an opportunity to do clever things. One of those things is the so-called X macro, which saw a lot of use in DEC System 10 code but probably dates back even earlier. You can still use it today if you like, even though there are, of course, other arguably better ways to get the same result. However, the X macro can be very efficient, and you may well run into it in some code, too.

Background

Preprocessing used to be a staple of programming. The idea is that code is manipulated purely at the text level before it is compiled. These days, languages with a preprocessor usually handle it as part of the compiler, but you can also use an external preprocessor like m4 for more sophisticated uses.

Modern languages tend to provide other ways to accomplish many of the tasks handled by the preprocessor. For example, if you have a constant you want to set at compile time, you could say:

int X = 32;
y = X;

But then you’ve created a real variable along with the overhead that might entail. A smart compiler might optimize it away for you, but you can be sure by writing:

#define X 32
y = X;

A modern compiler would prefer you to write:

const int X=32;
y = X;

But there are still some common uses for macros, like including header files. You can also make more sophisticated macros with arguments so you don’t incur a function call penalty, although modern usage would be to mark those functions as inline.

The Problem

Which brings us to the X macro. With all great hacks, there is first a problem to solve. Imagine you have a bunch of electronic parts you want to deal with in your code. You don’t want a database, and you don’t want to carry a bunch of strings around, so you define an enumerated type:

Continue reading “The X Macro: A Historic Preprocessor Hack”