WhoBuilt

Build enterprise generative AI apps using Llama 3 at 1,000 tokens/s on the SambaNova AI platform

Sep 11, 2024· 55 min· 3.8K views·Watch on YouTube

Speakers

Michelle Matern, director of solutions engineering at SambaNova, introduces the company’s AI platform and leads a workshop with principal AI engineer Petar Milani and senior principal AI solutions engineer Varun Krishna at an AI Engineer session.

SambaNova’s enterprise AI platform

Matern describes SambaNova as a full-stack AI company founded in 2017, building its own chips, systems, and software for training and inference. She says its platform aims to simplify enterprise deployment while supporting data privacy, model ownership, and specialized use cases.

Combining expert models

SambaNova’s One capability puts specialized models behind a single endpoint, with routing to select an expert for each prompt, scheduled fine-tuning, and model-level access controls. Matern describes a preconfigured composition of 92 experts spanning languages, domains, and tasks, alongside an option for organizations to build their own composition.

RDU memory and inference speed

Matern explains that SambaNova’s SN40L reconfigurable dataflow unit uses on-chip memory, high-bandwidth memory, and DDR to store and move models. She cites 4 GB of SRAM, 512 GB of high-bandwidth memory, and up to 6 TB of DDR, and says the system can hold up to five trillion parameters. In a demo, Pedro shows Llama 3 8B at 1,000 tokens per second, with a reported 0.09-second time to first token.

Building a basic Llama 3 app

The workshop starts with a Python example that loads environment variables, initializes a SambaStudio endpoint through LangChain, and makes an inference call. The demo covers model settings such as sampling, temperature, and maximum output tokens. It also shows how Llama 3’s special prompt tokens can help shape the response.

Creating an enterprise RAG search app

The second exercise builds a question-answering system using retrieval-augmented generation. The workflow loads and splits documents, embeds chunks with E5 Large v2, stores them in ChromaDB, retrieves relevant passages, and sends them with a question to the Llama 3 endpoint. In a demo using a 15-page PDF, the notebook creates 89 chunks and retrieves three for a question; the presenter recommends the Unstructured loader for tables that PDF extraction handles poorly.

Takeaways

  • A single endpoint can simplify access to multiple specialized models, while routing and access controls help manage which model handles each request.
  • The SN40L’s tiered memory design is intended to keep many models available within one system; evaluate the stated capacity against your own workload and deployment needs.
  • Benchmark inference with both throughput and latency measures, including time to first token and end-to-end response time.
  • Use the model’s prompt format and tune sampling, temperature, and output length to control generated responses.
  • For RAG, test document loaders on your actual files: table-heavy PDFs may need a different loader than ordinary text documents.

Mentioned in this talk

Search inside this talk

What was claimed 13

Show all 13 facts

Related talks