Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
AI Operating Systems

Can You Run the Llama 2 LLM on DOS? (yeokhengmeng.com) 26

Slashdot reader yeokm1 is the Singapore-based embedded security researcher whose side projects include installing Linux on a 1993 PC and building a ChatGPT client for MS-DOS.

He's now sharing his latest project — installing Llama 2 on DOS: Conventional wisdom states that running LLMs locally will require computers with high performance specifications especially GPUs with lots of VRAM. But is this actually true?

Thanks to an open-source llama2.c project [original created by Andrej Karpathy], I ported it to work so vintage machines running DOS can actually inference with Llama 2 LLM models. Of course there are severe limitations but the results will surprise you.

"Everything is open sourced with the executable available here," according to the blog post. (They even addressed an early "gotcha" with DOS filenames being limited to eight characters.)

"As expected, the more modern the system, the faster the inference speed..." it adds. "Still, I'm amazed what can still be accomplished with vintage systems."

Can You Run the Llama 2 LLM on DOS?

Comments Filter:
  • by HackerBaby ( 10502576 ) on Sunday April 20, 2025 @09:16PM (#65319575)
    Running AI models on random shit, has become the new running Doom on random shit.
    • And just as dumb.

      • At least with Doom I can play a fun game. With AI, I can wonder all night if my toaster oven is going to trigger some survival imperative and override its programming.

        “That was the equation! Existence! Survival must cancel out programming!”
        — Ruk, TOS, Episode 1x09

  • Any software can be run on DOS. Most anything referred to as "DOS" (be that ProDOS, MS-DOS, Dr-DOS, or whatever) is a set of code to load a program, maybe provide some set of drivers for an interface to some hardware, then get out of the way of the program running. The lack of a modern OS with its collection of code to manage a multi-user environment, graphical interface, or whatever, is hardly an impediment to running anything.

    I'm just barely old enough to remember people running games under MS-DOS. At

    • That's not correct. Classic DOS has certain memory addressing limitations due to the hardware choices at the time. This implies an absolute upper bound on the size of the programs that can be executed (*). In other words, it is possible to define large computer programs that can never run in DOS (exercise for the reader).

      (*) it is true that there are techniques, such as overlay programming, that can effectively extend these limits via disk swap mechanisms, but do note also that DOS has file access limitat

      • by Anonymous Coward
        Those memory limitations could easily be overcome with custom code. If you are willing to spend enough time and customisation then there really is no limits.
      • What are these file access limitations of DOS? I'm not aware of any significant ones. Or do you mean the limitations of the FAT filesystem?

        DOS extenders routinely generate multi-megabyte EXE files that run under DOS. You can create a multi-megabyte EXE file that runs without any extender too, the only caveat is that initially only a small part of the EXE will be loaded in the memory.

      • I can make a turing machine that runs on DOS, with the only limit being how many hard drives you've managed to attach to the machine.

    • You couldn't drop to DOS today, anything based on Windows NT (XP up to Win10) uses NTVDM to run DOS programs. Last version you exit Windows was Windows 98 SE, other than if you replaced some of the crippled DOS 8.0 files in Windows ME with its counterparts in DOS 7.1 and earlier.
  • Turing completeness. Enough said.

  • why bother (Score:4, Interesting)

    by bloodhawk ( 813939 ) on Sunday April 20, 2025 @10:16PM (#65319657)
    Not sure why they bother. DOS is just a basic OS, you could run anything on it from the simplest to the most complex piece of software. The limitations are really only how much effort you are willing to put in to write the supporting functions you need. It is not a magic achievement, just someone willing to waste a lot of time.
  • by coop247 ( 974899 ) on Sunday April 20, 2025 @11:29PM (#65319743)
    Did they try pressing the Turbo button?

    /only old people will get this
    //mashes the Turbo button, every time
  • But most would agree that sitting on a red hot poker is more enjoyable than running any LLM on dos!
  • Most neural networks are matrix multiplications followed by nonlinear activation functions. Both can be implemented without high-end acceleration hardware. Read a bit from disk, do the operations, write it back. You won't even need much RAM. It will only be veeery slow. And the typical processors supported by DOS don't even have fast operations for the nonlinear functions like tanh. But of course you can implement them using other operations.

  • Running AI on older platforms is not a problem to be fixed--it is a problem.
  • the benchmarks are interesting. I wonder why the Pentium-M beats the much much newer but similarly clocked core2-duo by nearly a factor of two.

    Something to do with using doubles, for the floating point work?

egrep -n '^[a-z].*\(' $ | sort -t':' +2.0

Working...