AI news
October 19, 2024

Build Web Apps Instantly With LlamaCoder: An Open-Source AI Programmer

LlamaCoder is an open-source AI programming assistant built on Llama 3.1 405B.

Jim Clyde Monge
by 
Jim Clyde Monge

In the last few months, there have been some incredible developments in the field of AI-powered programming assistants. Tools like Claude Artifacts, Claude Dev, and Cursor AI are enabling thousands of developers and non-developers to build web apps in a matter of minutes without writing a single line of code.

Today, a new AI-powered coding assistant called LlamaCoder from Together AI is capable of generating web applications from text descriptions.

Why does it matter? LlamaCoder is 100% free and open source.

What is LlamaCoder?

LlamaCoder is an open-source web application from Together AI that allows users to generate an entire app from a text prompt using Meta’s latest and most capable open-source 405-billion-parameter language model, Llama 3.1 405B.

Together AI is a San Francisco-based company that specializes in generative artificial intelligence (AI). It offers services for building, training, and running AI models, including private data and dedicated GPU clusters.

The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction-tuned generative models in 8B, 70B, and 405B sizes (text in/text out). The Llama 3.1 instruction-tuned text only models (8B, 70B, and 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.

Here’s how Llama 3.1 compares to close competitors like GPT-4, GPT-4o, and Claude 3.5 Sonnet.

Here’s how Llama 3.1 compares to close competitors like GPT-4, GPT-4o and Claude 3.5 Sonnet.
Image from Meta AI

In just over a month since its release, LlamaCoder has more than 2,000 GitHub stars, hundreds of developers have cloned the repository, and more than 200,000 apps have been generated.

“Our vision is to bring innovations from research to production the fastest. Built on our leading inference optimization research, the Together Inference Engine leverages innovations including FlashAttention-3 kernels, custom-built speculators based on RedPajama, and the most accurate quantization techniques available on the market,” El Mghari, a software engineer leading developer relations at Together AI.

How Does LlamaCoder Work?

You can try out LlamaCoder for free here.

There’s no need to sign up. You can immediately describe the app you have in mind in the prompt field and hit the Enter key.

How Does LlamaCoder Work? You can try out LlamaCoder for free here. There’s no need to sign up. You can immediately describe the app you have in mind in the prompt field and hit the Enter key.
Image by Jim Clyde Monge

You can also change the model and enable or disable the Shadcn UI.

  • Model options: Choose between Llama 3.1 405B, Llama 3.1 70B, or Gemma 2 27B.
  • Shadcn UI is a lightweight, open-source UI framework that helps developers create custom interfaces. I suggest enabling this toggle.

Let’s try an example.

Prompt: Build me a simple calculator app
llamacoder :Prompt: Build me a simple calculator app
Image by Jim Clyde Monge

The processing speed is surprisingly fast. This example took only around 10 seconds to complete. The code is also streamed on the left side of the dashboard.

Llamacoder: Prompt: Build me a simple calculator app
Image by Jim Clyde Monge

You can click on the “Open in sandbox” button at the lower right corner to open the app in CodeSandbox.

LlamaCoder opensandbox
Image by Jim Clyde Monge

This gives you the opportunity to make further modifications to the application as you wish.

Of course, you can still ask the AI to make adjustments to the app. For example, we can upgrade the calculator app to support scientific calculations by using the prompt below:

Prompt: Update the calculator to support more complex and scientific calculations
Llamacoder example calculator app. Prompt: Update the calculator to support more complex and scientific calculations
Image by Jim Clyde Monge

Awesome. You can publish the app to make it publicly visible. Click on the “Publish app” button, and LlamaCoder will generate a link like this: https://llamacoder.together.ai/share/SsXU8.

Llamacoder: Awesome. You can publish the app to make it publicly visible. Click on the “Publish app” button, and LlamaCoder will generate a link
Image by Jim Clyde Monge

There seems to be no page on the website where you can explore publicly shared web apps generated with LlamaCoder.

If you’re curious how LlamaCoder compares to Claude’s Artifacts, let’s do a similar prompt.

Prompt: Build me a calculator app with support for scientific calculations
Claude artifacts. Prompt: Build me a calculator app with support for scientific calculations
Image by Jim Clyde Monge

The result looks pretty much the same, but I personally prefer the look and feel of the one built with Claude AI.

LlamaCoder is Open-Source

If you want to run LlamaCoder on your local machine, start with downloading the weights on HuggingFace.

LlamaCoder is Open-Source If you want to run LlamaCoder on your local machine, start with downloading the weights on HuggingFace.
Image by Jim Clyde Monge

Here’s LlamaCoder’s tech stack:

  • Llama 3.1 405B from Meta for the LLM
  • Together AI for LLM inference
  • Sandpack for the code sandbox
  • Next.js app router with Tailwind
  • Helicone for observability
  • It uses Plausible for website analytics

To set up and run LlamaCoder, clone the project from GitHub, install dependencies, and run it by following the instructions below:

  1. Clone the repo: git clone https://github.com/Nutlope/llamacoder
  2. Create a .env file and add your Together AI API key: TOGETHER_API_KEY=
  3. Run npm install and npm run dev to install dependencies and run locally

Final Thoughts

I appreciate Together AI for making LlamaCoder free and open source. I find it helpful when you’re building simple apps like a calculator or a tic-tac-toe game.

If you’re thinking about building full-stack, complex web apps, LlamaCoder might not be your best option. Or perhaps you can use it to start with a small app and iteratively improve it to get a complex app.

I highly recommend checking out more powerful AI tools for programming like Cursor AI or Claude Dev. I was able to build and launch a full-blown SaaS app called Flux Labs in six weeks using Cursor AI.

Get your brand or product featured on Jim Monge's audience