I'm making LLMs work on small and old devices

(github.com)

91 points | by mrashad74 2 hours ago

10 comments

  • Farmadupe2 30 minutes ago
    For the last five months or so, opus and fable have both been able to do this task as a soneshot prompt. An inference engine is almost pure compute and to a first approximation the only operation your hardware needs to support to do llm inference is multiplication [the rest of an inference engine is "some trig"].

    So to get any model working on $OLD_HARDWARE, the hardest part of the task is now sourcing the hardware itself and giving the agent ssh access -- a modern agent will be able to source a compiler, write the implementation, optimize it, test in qemu (or any other simulator) and push it onto the device.

    Example prompt: "write an inference engine for qwen3 0.6b in pure assembly that runs on this device. Write a script to attach the weights to the resulting binary. Prefix is supplied as a stream of u32 token IDs on stdin. The engine streams u32 token IDs on stdout."

    • mrashad74 3 minutes ago
      I agree with you, and I'm using claude and other models heavily, the idea is not in the soneshot - because actually as you see in the logs I posted on github, it took around 107 + 50-ish experiments to figure out which models to run which and push the speed.

      I'm treating it as a search algorithm project, where I develop the methdology and search for pushing the limit of devices and searching in a big space of possible kernels and so for what works for a specific hardware.

      so I'm looking at it from a different prespective, it takes a lot of brute forcing, and claude can do this well, the whole game (to me) is which directions you push the model into to reduce the search space. and how that learning from very small and tight devices you can scale these techniques.

      But in essence, I don't disagree with your sentiment - the goal is not 0.6B models, these are extremely trivial as you mentioned and as I showed in the experiments, the goal is 16B+ models, and this as far as I've seen, requires smart methods to search for optimizations and customizations both to the model and inference engines.

  • yjftsjthsd-h 38 minutes ago
    It's technically sweet regardless, so don't take this as even a little bit of negative pushback, but I am curious what the utility of these small models is? Are they smart enough to be useful on practical tasks? What are people doing with them?
    • gonzalohm 28 minutes ago
      Not op but my opinion is that It doesn't matter if it's not currently useful. I think it's important that the community focuses on this line of research because big companies will not. It's in their best interest to make LLMs resource hungry
    • mrashad74 7 minutes ago
      This is an interesting question, so the idea is, based on experience, fine tuned small models can do narrow tasks very well (my experience running models fine-tuned on customer data as low as 1-2B is very promising) also the goal is to find a breakthrough were instead of the line of work (which I respect) that tries to squeeze much bigger models into smaller hardware like strata and maya, I'm working backward to discover/search for custom kernels and modifications till we exhaust the limit of what a smaller machine is capable of, so instead of people doing 64gb machines and old gpus to run a deepseek, I want to see what is the biggest usable qwen small model can run with reasonable speed on smaller devices, and by scaling as we discover more tricks, normal laptops can unlock more compute - for example a qwen 3.8 27B can do pretty serious work when coupled with a specialized harness - but we are yet to figure out what is the smallest machine that can run it with usable output and usable speed, and this can unlock interesting business.
    • sebazzz 31 minutes ago
      Also curious on this. They are too dumb to use with tools and if you ask it how to bake a pancake you only get rubbish.
      • mrashad74 2 minutes ago
        I mostly agree today, but I'm trying to push for the future where smaller models are more capabable, and I believe it will happen + the fine tuned cases I mentioned in other commments.

        On other notes : there is no free lunch, you have to sacrifice something for the other

    • gabucino 25 minutes ago
      [dead]
  • jedbrooke 1 hour ago
    in a similar vein, somebody got tinystories LLM running on the nintendo wii, including gpu acceleration [0].

    0: https://github.com/brysontang/iiama2.c

    • mrashad74 11 minutes ago
      this looks very interesting, it can't run a real (read : working on some real tasks) LLM, yet, but it's actually very interesting device.
  • mrashad74 2 hours ago
    Recently I started this open source project at my AI company, where I'm trying to make LLMs working

    Now Reached 16B models running on iPad Air 1st gen and xiaomi tv box, both have less than 1GB of usable memory, and reached some decent speeds given the hardware.

    I'm open sourcing the effort done, kernels developed and results for everyone to re-produce and push more, also the modified models are on hugging face : https://huggingface.co/hyperionaidev

    I want a more challenging device, what do you think?

    • shujito 1 hour ago
      perhaps the pi 1st/2nd gen?

      I'd thought of the ESP32 devices but their RAM is too small

      • gabucino 48 minutes ago
        Pi 1 is too easy. My PicoLM [fork] already runs on it.

        It also runs on MS-DOS 80386 2MB RAM, so...

        And iPhone 1. And Digital UNIX.

    • fredley 1 hour ago
      > a more challenging device

      A Playdate

      • Isamu 14 minutes ago
        Aw man I would love to be able to use the crank to back up the agent dialogue, maybe make it branch forward in a different direction. Make the dialogue into a game

        https://play.date/

        • mrashad74 0 minutes ago
          pretty interesting, I don't own one, but it's possible probably with an emulator to figure this out, thanks!
    • post-it 1 hour ago
      > I want a more challenging device, what do you think?

      One of those vapes with a screen on it.

  • dava96 1 hour ago
    This is really cool man. I like this on going trend of resurrecting old tech with AI and this is yet another avenue to explore.

    I'd be interested in seeing some older flag ship mobile devices

    • mrashad74 1 hour ago
      I have a few phones and tablets laying around, will try to play with..
  • hasperdi 24 minutes ago
    What can these small models do? Are they just for novelty?
  • mkanephl 43 minutes ago
    ESP P4 or ESP S31?
    • mrashad74 13 minutes ago
      challenge accepted, I have one lying around, will see.
  • ForHackernews 1 hour ago
    This is great. I've recently been playing with repurposing some old thin clients as homelab Linux machines

    Not my site, but same idea: https://www.parkytowers.me.uk/thin/

    All this old/obsolete gear is plenty capable when used with the right software.

    • dava96 1 hour ago
      Out of interest, what have you been doing with them?
      • ForHackernews 34 minutes ago
        Running a pihole, a WeeWx weather station, a NAS backup server, a wireguard VPN, Zot container registry.
  • bigfamilyparent 13 minutes ago
    [flagged]
  • gabucino 1 hour ago
    [dead]