
Local LLM Exploration with Ollama
- I often receive legitimate questions about how educators can safely and effectively introduce and integrate AI into the classroom. (Very hard question to answer by the way! )
- Working with Large Language Models (LLMs), particularly lightweight, local models, can be a solid starting point. By examining how these models function on your own hardware, we can move from being mere consumers of AI to informed users. (That’s the goal for sure!)
Objectives: (Participants Will)
- Examine the Ollama Framework: Explore this open-source application to understand its capabilities for running, managing, and serving LLMs locally.
- Deploy via Docker: Initialize a Docker container to host the Ollama engine along with a compatible Chat UI Webpage.
- Install Different LLMs: Download a specific LLM (e.g., Llama 3 or Mistral) and start a direct chat session via the web interface.
- Examine Fundamental LLM Characteristics:
- Tokens: Understand how text is broken into numerical chunks for processing.
- Weights: Learn about the learned numerical values that represent the strength of connections in the neural network.
- Parameters: Discover how the total count of these variables determines a model's complexity and capability.
- Explore Advanced Concepts:
- Context Windows: Understand the "working memory" limits of a model and how it affects long conversations.
- API Management: Learn to interact with the Ollama server programmatically using
curl commands to send prompts and receive JSON responses.
- Python Integration: Write a simple Python script to build a custom CLI-style chat interface that enables automated and creative use of the model.
Getting Started:
- First, we’ll install the application and interact with it.
- (Let’s get straight to the point!)
Requirements:
- Ubuntu/Kali VM with 30G-40G disk space (to be safe)
- 8G of RAM (LLMs are memory and disk-hungry!)
Teacher Note: