Live data from Hacker News

Llamafile lets you distribute and run LLMs with a single file

github.com

81–90 of 302 posts

Re: Llamafile lets you distribute and run LLMs with a single file

#81
post #80

If my reading is correct, this literally just distribute an LLM model and code, and you need to do some tasks - like building - to make it actually run, right? And for this, you need to have additional tools installed?

You don't need to do any extra build tasks - the file should be everything you need.

There are some gotchas to watch out for though: https://github.com/mozilla-Ocho/llamafile#gotchas

Re: Llamafile lets you distribute and run LLMs with a single file

#82
post #56

I've been playing with various models in llama.cpp's GGUF format like this. git clone https://github.com/ggerganov/llama.cpp cd llama.cpp make # M2 Max - 16 GB RAM wget -P ./models https://huggingface.co/TheBloke/OpenHermes-2.5-Mistral-7B-16k-GGUF/resolve/main/openhermes-2.5-mistral-7b-16k.Q8_0.gguf ./server -m models/openhermes-2.5-mistral-7b-16k.Q8_0.gguf -c 16000 -ngl 32 # M1 - 8 GB RAM wget -P ./models https://hu…

even easier with https://gpt4all.io/index.html

Re: Llamafile lets you distribute and run LLMs with a single file

#83
post #8

Extremely cool and Justine Tunney / jart does incredible portability work [0], but I'm kind of struggling with the use-cases for this one. I make a small macOS app [1] which runs llama.cpp with a SwiftUI front-end. For the first version of the app I was obsessed with the single download -> chat flow and making 0 network connections. I bundled a model with the app and you could just download, open, and start using it.…

The binaries themselves are available standalone https://github.com/Mozilla-Ocho/llamafile/releases

cool. this is more convenient than my workflow for doing the binaries myself. I currently use make to generate a binary of llama.cpp server on my intel iMac and my m1 MacBook then lipo them together.

Re: Llamafile lets you distribute and run LLMs with a single file

#84
Wow, it has CUDA support even though it's built with Cosmopolitan? Awesome, I see Cosmopolitan just this month added some support for dynamic linking specifically to enable GPUs! This is amazing, I'm glad they found a way to do this. https://github.com/jart/cosmopolitan/commit/5e8c928f1a37349a...

I see it unfortunately requires the CUDA developer toolkit to be installed. It's totally possible to distribute CUDA apps that run without any dependencies installed other than the Nvidia driver. If they could figure that out it would be a game changer.

Re: Llamafile lets you distribute and run LLMs with a single file

#85
post #55
post #42

Earlier quoted context omitted.

I guess in every world I've worked in, deployment involved deploying a small executable which would run millions of times on thousands of servers, each instance loading a different model (or models) over its lifetime, and the weights are stored in a large, fast filesystem with much higher aggregate bandwidth than a typical local storage device. The executable itself doesn't even contain the final model- just a descri…

> a large, fast filesystem with much higher aggregate bandwidth than a typical local storage device that assumption gets wrong very fast with nvme storage, even before you add herding effects

Until you compare a single machine with nvme to a cluster of storage servers with nvme, and each machine has 800Gbit connectivity and you use smart replication for herding. but yes, nvme definitely has amazing transfer rates.

Re: Llamafile lets you distribute and run LLMs with a single file

#86
post #43

Earlier quoted context omitted.

You're right. The limit is 4 gibibytes . Astonishingly enough, the llava-v1.5-7b-q4-server.llamafile is 0xfe1c0ed4 bytes in size, which is just 30MB shy of that limit. https://github.com/Mozilla-Ocho/llamafile/commit/81c6ad3251f...

Not at my windows machine to test this out right now, but wondering what you mean by having to store the weights in a separate file for wizardcoder, as a result of the 4gb executable limit. How does one go about this? Thank you!

You'd do something like this on PowerShell:

    curl -Lo llamafile.exe https://github.com/Mozilla-Ocho/llamafile/releases/download/0.1/llamafile-server-0.1
    curl -Lo wizard.gguf https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGUF/resolve/main/wizardcoder-python-13b-v1.0.Q4_K_M.gguf
    .\llamafile.exe -m wizard.gguf

Re: Llamafile lets you distribute and run LLMs with a single file

#87
post #14

I think the best way to try this out is with LLaVA, the text+image model (like GPT-4 Vision). Here are steps to do that on macOS (which should work the same on other platforms too, I haven't tried that yet though): 1. Download the 4.26GB llamafile-server-0.1-llava-v1.5-7b-q4 file from https://huggingface.co/jartine/llava-v1.5-7B-GGUF/blob/main/... : wget https://huggingface.co/jartine/llava-v1.5-7B-GGUF/resolve/main/…

Phenomenal quickstart, and thanks for the write-up. It’s so thrilling that we’re at this point in portability and ease relative performance.

Re: Llamafile lets you distribute and run LLMs with a single file

#89
post #8

Extremely cool and Justine Tunney / jart does incredible portability work [0], but I'm kind of struggling with the use-cases for this one. I make a small macOS app [1] which runs llama.cpp with a SwiftUI front-end. For the first version of the app I was obsessed with the single download -> chat flow and making 0 network connections. I bundled a model with the app and you could just download, open, and start using it.…

>I make a small macOS app [1] which runs llama.cpp with a SwiftUI front-end. For the first version of the app I was obsessed with the single download -> chat flow and making 0 network connections. I bundled a model with the app and you could just download, open, and start using it. Easy! But as soon as I wanted to release a UI update to my TestFlight beta testers, I was causing them to download another 3GB. All 3 users complained :).

Well, that's on the MAS/TestFlight for not doing delta updates.

Re: Llamafile lets you distribute and run LLMs with a single file

#90
post #8

Extremely cool and Justine Tunney / jart does incredible portability work [0], but I'm kind of struggling with the use-cases for this one. I make a small macOS app [1] which runs llama.cpp with a SwiftUI front-end. For the first version of the app I was obsessed with the single download -> chat flow and making 0 network connections. I bundled a model with the app and you could just download, open, and start using it.…

I don't get this obsession with 0-click everything. It is really annoying when you don't want to install everything to your main hard drive. I have all my models downloaded, organized, and ready-to-go but apps won't even ask for that, instead it presumes I am an idiot and downloads it (again!) for me.

At least Makeayo asks where my models are now. It's obnoxious that I have to use symlinks for comfy/automatic....

All they need to do is ask me where my stuff is on first run, and an area in the config to update that setting. Not so hard!

Post reply on HN