This lesson is being piloted (Beta version)

How to use Ollama with SuperPOD

Overview

Teaching: 20 min
Exercises: 0 min
Questions
  • How to use Ollama

Objectives
  • OLLAMA on SuperPOD

OLLAMA

Key Features of Ollama:

Ollama on SuperPOD

How to use LLaMA3 on SuperPOD

Step 1: request a compute node with 1 GPU:

$ srun -A Allocation -N1 -G1 --mem=64gb --time=12:00:00 --pty $SHELL

Step 2: Load Ollama model:

$ module load ollama

Step 3: Export path to Ollama model

Here we use Ollama models from STARS Project storage. Please inform me if you need access to that location.

$ export OLLAMA_MODELS=/projects/tuev/LLMs/LLMs/Ollama_models/

Step 4: Serve Ollama

$ ollama serve &

Step 5: Now Ollama has been loaded and served. Let’s check the local models:

$ ollama list

You should see the screen like this:

image

If there are any other models that you want us to download, please email me: tuev@smu.edu

Step 6: Download Ollama model

You can download any LLM model that you downloaded previously to chat:

$ ollama pull llama3:70

Step 7: Run Ollama model

You can run any LLM model that you downloaded previously to chat:

$ ollama run llama3:70

image

Step 8: Stop Ollama model

$ killall ollama

Key Points

  • Meta, Ollama, SuperPOD