Ollama runs Llama 2 locally through Docker, making local model evaluation practical on modest commodity hardware. section 9.2
Listing 9.3 Starting and running Ollama
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama docker exec -it ollama ollama run llama2
Use the Docker commands to start Ollama, expose its service, and launch Llama 2; the initial model download may take several gigabytes. section 9.2.2
A practical Ollama workflow includes:
- Run the container with persistent model storage and start Llama 2 interactively. section 9.2.2
- Download the model while connected to a stable internet connection; afterward, Ollama can run without internet access. section 9.2.2
- Compare generated answers with a known-correct ChatGPT baseline rather than accepting local output automatically. section 9.2.2
- Refine prompts when the first answer is ambiguous, then question inconsistencies and inspect the resulting code or explanation. section 9.2.2
Checking a standard-deviation answer
Ask Llama 2 for pure-Python standard-deviation code, then restrict the prompt to exclude libraries. Review its formula, test the implementation, and ask why it uses n − 1 when the result differs from another baseline. section 9.2.2







