Towards AI

The leading AI community and content platform focused on making AI accessible to all. Check out our new course platform: https://academy.towardsai.net/courses/beginner-to-advanced-llm-dev

Follow publication

Member-only story

Llama 3 + Llama.cpp is the local AI Heaven

Vatsal Saglani
Towards AI
Published in
18 min readMay 12, 2024

--

Image by ChatGPT

The Quest for Local AI Innovation

This is the third time in three weeks that I’m writing about developing AI-powered or GenAI-powered applications that work with local LLMs. Since, the release of Llama 3 and Phi-3-Mini I’ve been waiting for weekends to spend time building something cool locally without spending anything on API calls or GPU servers.

Image by ChatGPT

Throughout the last week, I’ve been thinking about what to build with these local LLMs during this weekend. And I couldn’t come up with anything until Sunday afternoon. Though I had a lot of ideas I stopped myself thinking I wouldn’t be able to achieve them with these local LLMs. But then that’s the test, right?

Ambition Meets Reality

Hence, I decided to develop a DiagramGPT using a 3-bit quantized Llama 3 8B LLM. As soon as I started writing code I realized it was too ambitious to create something like DiagramGPT in some hours. So I decided to narrow down the use case to generate cloud system architecture from a user description.

I already knew about the diagrams library in Python and was quite sure I could hack some code in a couple of hours and quickly publish my weekly LLM blog. But that wasn’t the case the Llama 3 8B model didn’t know much about this library and whatever it understood was just very basic.

Image By ChatGPT

But as I was too desperate not to break my weekly LLM blog streak so I went through the library’s code base and found out it used the graphviz library underneath and has a collection of cloud service logos that are added as the node image when used in the diagram. The following link contains all the cloud-service logos it contains.

--

--

Published in Towards AI

The leading AI community and content platform focused on making AI accessible to all. Check out our new course platform: https://academy.towardsai.net/courses/beginner-to-advanced-llm-dev

Written by Vatsal Saglani

Data Science Lead - GenAI. A Software Engineer, Programmer & Deep Learning professional. https://vatsalsaglani.pages.dev/