惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
H
Help Net Security
Jina AI
Jina AI
V
V2EX
G
Google Developers Blog
B
Blog
GbyAI
GbyAI
U
Unit 42
爱范儿
爱范儿
腾讯CDC
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
小众软件
小众软件
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
博客园 - 聂微东
The Cloudflare Blog
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏

Runpod Blog.

New Runpod datacenter now live: AP-IN-1 Track GPU spend across your team with Cost Centers The GPU supply supercycle is here. Here’s what AI builders need to know. Community Spotlight: One-click AI image and video generation on Runpod with SwarmUI | Runpod Blog Community Spotlight: LoRA Pilot Data Prep to Inference Introducing the Runpod Assistant: Manage Your Cloud GPU Resources with Natural Language OpenAI's Parameter Golf: Train the Best Language Model That Fits in 16MB on Runpod LLM inference optimization: techniques that actually reduce latency and cost Pruna P-Video and Vidu Q3 public endpoints now available on Runpod Runpod brand spelling guide Quickstart - Runpod Documentation The AI market looks nothing like the narrative Training StyleGAN3 with Vision-Aided GAN on Runpod KoboldAI – The Other Roleplay Front End, And Why You May Want to Use It How to Connect Cursor to LLM Pods on Runpod for Seamless AI Dev Community Spotlight: How AnonAI Scaled Its Private Chatbot Platform with Runpod Prompt Scheduling with Disco Diffusion on Runpod Runpod's Latest Innovation: Dockerless CLI for Streamlined AI Development Run Your Own AI from Your iPhone Using Runpod Introducing Flash: Run GPU workloads on Runpod Serverless: No Docker required Use Claude Code with your own model on Runpod: No Anthropic account required Avoid Errors by Selecting the Proper Resources for Your Pod What hackers built on Runpod at TreeHacks 2026 Easily Back Up and Restore Your Pod with Cloud Sync + Backblaze B2 The Complete Guide to GPU Requirements for LLM Fine-Tuning AI Guides, Tutorials & GPU Infrastructure Insights | Runpod Your first Claude Code project within Runpod: a complete setup guide 10 billion Serverless requests and counting Building for resilience: Runpod’s response to the AWS us-east-1 outage How to Connect Google Colab to Runpod
Run Llama 3.1 405B with Ollama on Runpod: Step-by-Step De...
Shaamil Karim · 2024-07-29 · via Runpod Blog.

Meta’s recent release of the Llama 3.1 405B model has made waves in the AI community. This groundbreaking open-source model not only matches but even surpasses the performance of leading closed-source models. With impressive scores on reasoning tasks (96.9 on ARC Challenge and 96.8 on GSM8K) and code generation (89.0 on the HumanEval benchmark), Llama 3.1 is a game-changer.

Follow this guide to lean how to deploy the model on Runpod using Ollama, a powerful and user-friendly platform for running LLMs. Plus, we’ll show you how to test it in a ChatGPT-like WebUI chat interface with just one Docker command.

Why Use Llama 3.1 405B?

Llama 3.1 is groundbreaking for three main reasons:

  • Exceptional Performance: With 405 billion parameters, it outperforms most models, including GPT-4o, in crucial benchmarks like math and multilingual tasks.

Benchmark table comparing Llama 3.1 405B with Nemotron 4 340B, GPT-4, GPT-4 Omni, and Claude 3.5 Sonnet

  • Customizable: Offers an open-source alternative with top-tier capabilities, providing enhanced accessibility and customization for unique use cases.
  • Cost-effective: Running your own model on services like Runpod can be much cheaper than many large closed-model APIs.

For more details on Llama 3.1, check out Meta’s blog.

Prerequisites

1) Create your Runpod account and add at least $10 to rent your GPU.

Create Runpod Account

2) Install docker.

1. Create and Configure your GPU Pod

1) Head to Pods and click Deploy.

Runpod pods button in Run Llama 3.1 405B with Ollama on Runpod

2) Select H100 PCIe and choose 3 GPUs to provide 240GB of VRAM (80GB each). The Llama 3.1 405B model is 4-bit quantized, so we need at least 240GB in VRAM. For more details, check our blog on picking the right VRAM.

Runpod pick GPU in Run Llama 3.1 405B with Ollama on Runpod

3) Slide the GPU count to 3.

GPU count in Run Llama 3.1 405B with Ollama on Runpod

4) Click Change Template to "Better Ollama CUDA 12".

Ollama template in Run Llama 3.1 405B with Ollama on Runpod

5) Click Edit Template and edit the Container Disk and set it to 250 GB to account for storing the model.

Runpod pod template overrides form with an Ollama container image and 250 GB container disk

6) Click Set Overrides and Deploy.

7) Find your pod and click Connect.

Runpod pod connect button in Run Llama 3.1 405B with Ollama on Runpod

8) Copy your SSH command.

Runpod pod terminal in Run Llama 3.1 405B with Ollama on Runpod

2. Download Ollama and Llama 3.1 405B

1) Open your terminal and run the SSH command copied above.

Terminal Runpod SSH in Run Llama 3.1 405B with Ollama on Runpod

2) Once you’re connected via SSH, run this command in your terminal:

This command fetches the Ollama installation script and executes it, setting up Ollama on your Pod. The ollama serve code starts the Ollama server and initializes it for serving AI models.

Terminal Ollama command in Run Llama 3.1 405B with Ollama on Runpod

3) Download the Llama 3.1 405B model (head up, it may take a while):

Start chatting with your model from the terminal. Let’s make it more interactive with a WebUI.

3. Running Llama 3.1 405B with Open WebUI’s chat interface

1) Open a new terminal window.

2) Run the following command, replacing {POD-ID} with your pod ID:


3) Once the above is done, go to http://localhost:3000/ and sign up for Open WebUI.

4) Click Select a model and choose the model we downloaded.

Open WebUI chat interface with the model selector listing llama3.1:405B

Done! You now have a chat interface to chat with your Llama 405b model using Ollama on Runpod.

Troubleshooting

  1. If the docker command doesn’t run, make sure the desktop app is up and running. You can also track your docker container and the logs from the Containers list.
  2. If you’re having issues with the Open WebUI interface, make sure you can chat with the model through the terminal like in Step 2.3 to isolate the issue. Check out Open WebUI’s docs for more help or leave a comment on this blog.

If you’re still facing issues, comment below on this blog for help, or follow Runpod’s docs or Open WebUI’s docs.

Conclusion

To recap, you first get your Pod configured on Runpod, SSH into your server through your terminal, download Ollama and run the Llama 3.1 405b model through the SSH terminal, and run your docker command to start the chat interface on a separate terminal tab.

You now have a taste for the speed and power of running the Llama 3.1 405B model with Ollama on Runpod. By leveraging Runpod’s scalable GPU resources and Ollama’s efficient deployment tools, you can harness the full potential of this cutting-edge model for your projects. Whether you are fine-tuning, conducting research, or developing applications, this setup provides the performance and accessibility needed to push the boundaries of what is possible with AI. Check out our blog on Fine-tuning vs RAG to decide the right option to customize your setup.

Sign up for our Runpod blog for more tutorials and informational content on cutting-edge developments in AI. Add a comment on what you’d like to see next in our blogs!

Deploy Llama3.1 405B on Runpod

Author profile: Shaamil Karim