LLAMAFILE’s Progress, Four Months in – Mozilla Hacks – The Web Developer Blog

When Mozilla’s Innovation Group first launched the llamafile project Late Last Year, We We WERELLED by the IMMMIDITE POSITIVE POMSE from Open source ai developers. It’s become one of mozilla’s top three most-favorite repositories on github, attracting a number of contributors, some excellent prs, and a growing community on our Discord server,

Through it all, lead development and project visitor justine tunney has remained hard at work on a wide variety of fundamental improvements to the project. Just last night, justine shipped the v0.8 release of llamfile, which include not only support for the very latest open models, but also a number of mumber of big performaments for cupu

As a result of justine’s work, today llamafile is bot the easyst and fastest Way to run a wide range of Open larger language models on your own hardware. See for yourself: With llamafile, you can run meta’s just-resumed llama 3 model-WHICH RIVALS The very best models availables in its size class-

How did we do it? To explain that, let’s take a step back and tell you about everyiething that’s changed since V0.1.

Tinyblas: democratizing GPU support for nvidia and Amd

LLAMAFILE is Built Atop the Now-Legendary llama.cpp Project. llama.cPP supports gpu-caretched infererance for nvidia processors via the cublas linear algebra library, but that requires users users to install nvidia’s cuda sdk. We felt uncomfortable with that fact, if it conflicts with our project goal of building a full open-source and transparent ai stack that Anyone Can Run Commodity Hardware. And Besides, Getting Cuda Set Up Correctly Can Be a Bear on Some Systems. There had a better way.

With the Community’s Help (Here’s Looking at You, @Ahgamut and @Mrdomino! Tinyblas makes Nvidia Acceleration Simple and Seamless for llamfile users. On Windows, you don’t even need to install cuda at all; All you need is the display driver you’ve probally alredy installed.

But tinyblas is about more than just nvidia: it supports amd gpus, as well. This is no small feat. While AMD Commands a Respectable 20% of Today’s GPU Market, Poor Software and Driver Support Have Historically Made A A Secondary Player in the Machine Learning Space. That’s a shame, give that amd’s gpus offer high performance, are price competition, and are widely available.

One of llamafile’s goals is to democratize access to open source ai technology, and that means getting amd a seat at the table. That’s exactly what we’ve don: with llamafile’s tinyblas, you can now easily make full use of your amd gpu to accelerate infection. And, as with cuda, if you’re a windows user you don’t even have to install amd’s rocm sdk.

All of this means that that, for many users, llamafile will automatically use your gpu right out of the box, with little to no effort on your part.

CPU Performance Gains for Faster Local Ai

Here at mozilla, we are keenly interested in the promise of “Local Ai,” in which ai models and applications run directed directly on End-outware instead of in the cloud. Local AI is exciting if it is opens up the possibleness of more user control over these systems and greener privacy and security for users.

But many consumer devices lacked the high-end gpus that are often required for infection tasks. llama.cpp has been a game-chager in this Regardscause It Makes Local Infection Both Possible and Usably Performant on CPUS INTEAD OF BCUST GPUS.

Justine’s recent work on llamafile has now pushed the state of the art even further. As corumented in Her Detailed Blog Post On the Subject, by Writing 84 New Matrix Multiplication Kernels She was alive to Increase Llamafile’s Prompt evaluation performance performance by an astonishing 10X compared to its previous release. This is a substantial and impactful step forward in the question to make local ai viable on consumer hardware.

This work is also a great example of our committee to the open source ai community. After completion this work we immmediately Submitted a pr To upstream these performance improvements to llam.cpp. This was just the latest of a number of enhancements we we have contributed back to llam.cp, a practice we plan to continue.

Raspberry pi performance gains

Speaking of Consumer Hardware, there are few examples that are bot more interesting and more humble than the beloved raspberry pi. For a bargain basement price, you get a full-featured computer running linux with planty of computing power for typical desktop uses. It’s an impressive package, but historically its considered a viable platform for ai applications.

Not any more. LLAMAFILE HAS Now Been Optimized for the latest model (the raspberry pi 5), and the result is that a number of smber of small llms-such as Rocket-3B (Download), Tinyllama -1.5B (Download), and phi-2 (Download) -Run at usable speeds on one of the least expensive computers available today. We’ve seen prompt evaluation speeds of up to 80 tokens/sec In some cases!

Keeping up with the latest models

The pace of progress in the open model space has been stunningly fastOver the past few months, hundreds of models have been released or updated via fin-tuning. Along the way, there has been a clear trend of evr-ambr-encreaging model performance and Ever-Smaller Model Sizes.

The llama.cpp project has been doing an excellent job of keeping up with all of these new models, frequent rolling-out support for new architectures and model feds with their release.

For our part we’ve been keeping llamafile closely synceded with llama.cpp so that we can support all the same models. Given the complexity of both projects, this has been no small feat, so we we’re lucky to have justine on the case.

Today, you can today use the very latest and most capable open models with llamafile thanks to her hard work. For example, we were able to roll-out llamfiles for meta’s newest llama 3 models-8B-insstruct and 70B-insstruct–Within a day of their release. With yesterday’s 0.8 release, llamafile can also run Grok, Mixtral 8x222B, and Command-R.

Creating your Own LLAMAFILES

Since the day that lLAMAFILE Shipped People Have Wanted to Create Their Own Llamafiles. Previous, this required a number of steps, but today you can do it with a single command, eg:

llamafile-convert [model.gguf]

In just mothers, this will produce a “model.llamafile” file that is ready for immediati use. Our Thanks to Community Member @Chan1012 For contributing this helpful improvement.

In a related development, hugging face recently added official support for llamafile within their model hub. This means you can now Search and filter Hugging face specifically for llamafiles created and distributed by other people in the open source communication.

Openai-Compatible API Server

Since it’s Built on top of llama.cpp, llamafile inherits that project’s server component, which provides openai-competible api endpoints. This enables developers who are building on top of Openai to Switch to Using Open Models Intead. At Mozilla we very much want to support this kind of future: One where open-source ai is a viable alternative to centraralized, closed, commercial offers.

While open models do not annual rival the capability of closed models, they’re making rapid program. We believe that making it Easier to Pivot Existing Code Over to Executing Against Open Models Will Increase Demand and Further Fuel This Progress.

Over the past few months, we’ve investment effort in extending these endpoints, both to increase functionality and improve compatibility. Today, llamafile can serve as a drop-in replacement for openai in a wide variety of use cases.

We want to further Extended our API Server’s Capability, and We’re Eager to Hear What Developers Want and Need. What’s Holding You Back from Using Open Models? What Features, Capabilites, Or tools do you need? Let us know,

Integrations with other open source ai projects

Finally, it’s been a delight to see llamafile adopted by independent developers and integrated into leading open source ai projects (like Open interpreterKudos in particular to our oven Kate Silverstein Who landed prs that add llamafile support to Langchain and Llamaindex (With Autogpt Coming soon).

If you’re a maintainer or contributor to an open source ai project that you feel would benefit from llamfile integration, Let us know how we can help,

Join us!

The lLAMAFILE Project is just getting starting, and it’s also only the first step in a major new initiative on mozilla’s part to contribute to contribute to and participate in the open source ai committee. We’ll have more to share about that song, but for now: I invite you to join us on the llamafile project!

The best place to connect with bot the llamafile team at mozilla and the overall lLAMFILE Community is over at our discord server, which has A dedicated channel just for llamafileAnd of course, your enhancement requests, issues, and prs are always Over at our Github Repo,

I hope you’ll join us. The next few months are going to be even more interesting and unexpected than the last, bot for llamafile and for open source ai itself.

Stephen leads open source ai projects (Including llamfile) in Mozilla Builders. He previous managed social bookmarking pioneer del.icio.us; Co-founded storium, Blockboard, and Farespin; And worked on yahoo search and bea weblogic.

More articles by stephen hood…

Ramesh Ghorai is the founder of www.livenewsblogger.com, a platform dedicated to delivering exclusive live news from across the globe and the local market. With a passion for covering diverse topics, he ensures readers stay updated with the latest and most reliable information. Over the past two years, Ramesh has also specialized in writing top software reviews, partnering with various software companies to provide in-depth insights and unbiased evaluations. His mission is to combine news reporting with valuable technology reviews, helping readers stay informed and make smarter choices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top