Two laptops, side by side, running Llama2 in DOS.

Will It Run Llama 2? Now DOS Can

Will a 486 run Crysis? No, of course not. Will it run a large language model (LLM)? Given the huge buildout of compute power to do just that, many people would scoff at the very notion. But [Yeo Kheng Meng] is not many people.

He has set up various DOS computers to run a stripped down version of the Llama 2 LLM, originally from Meta. More specifically, [Yeo Kheng Meng] is implementing [Andreq Karpathy]’s Llama2.c library, which we have seen here before, running on Windows 98.

Llama2.c is a wonderful bit of programming that lets one inference a trained Llama2 model in only seven hundred lines of C. It it is seven hundred lines of modern C, however, so porting to DOS 6.22 and the outdated i386 architecture took some doing. [Yeo Kheng Meng] documents that work, and benchmarks a few retrocomputers. As painful as it may be to say — yes, a 486 or a Pentium 1 can now be counted as “retro”.

The models are not large, of course, with TinyStories-trained  260 kB model churning out a blistering 2.08 tokens per second on a generic 486 box. Newer machines can run larger models faster, of course. Ironically a Pentium M Thinkpad T24 (was that really 21 years ago?) is able to run a larger 110 Mb model faster than [Yeo Kheng Meng]’s modern Ryzen 5 desktop. Not because the Pentium M is going blazing fast, mind you, but because a memory allocation error prevented that model from running on the modern CPU. Slow and steady finishes the race, it seems.

This port will run on any 32-bit i386 hardware, which leaves the 16-bit regime as the next challenge. If one of you can get an Llama 2 hosted locally on an 286 or a 68000-based machine, then we may have to stop asking “Does it run DOOM?” and start asking “Will it run an LLM?”

Continue reading “Will It Run Llama 2? Now DOS Can”

The Latest Linux – On A Floppy In A 486!

If you have ever studied the early history  of the GNU/Linux operating system in its many forms, you’ll have read that [Linus Torvalds] developed his first kernel for his Intel 386-based computer. Though the 386 architecture is now ancient, the current Linux kernel can still be compiled for it and many distributions still maintain an i386 branch to provide broad compatibility for later machines able to run i386 code. But what if you were to take a current Linux kernel and stick it on a floppy in a machine from the early 1990s, with meagre RAM? [Fozztex] did just that, with not a 386 but a 486, sporting what would have been an impressive for the time 36MB of RAM. You can watch it in action in the video below the break.

A recent Linux kernel is rarely if ever compiled for something as small as a floppy disk, so getting one to boot from such ancient media appeared to be a challenge. It was possible though with the tinyconfig make option, and after finding a small enough root filesystem courtesy of Aboriginal Linux, a bootable floppy was created. It’s not entirely useful and its sole purpose was to see whether Linux could see a large hard drive on the 486, but it’s still a version 5.6 Linux kernel booting from floppy on an ancient computer. Never complain that your Raspberry Pi Zero is slow again, we’ve come a long way!

Continue reading “The Latest Linux – On A Floppy In A 486!”