Ollama
Standard for running local LLMs โ a runtime that powers 100+ models with a single command.
Ollama is an open-source local LLM execution engine released in 2023 by Ollama Inc. It's an integrated package consisting of a GGUF quantized model based on llama.cpp, a REST API, and a Modelfile (a model definition similar to a Dockerfile). In short, it can be described as "just as Docker standardized container execution, Ollama standardizes local LLM execution." Installation involves a single binary for macOS/Linux/Windows, followed by a single line to download a model (e.g., ollama pull llama3.3:70b) and another line to run it or call the REST API on port :11434, which immediately provides OpenAI-compatible responses.
Previously, running local LLMs involved a complex chain of steps: (1) loading models with Hugging Face Transformers, (2) handling bitsandbytes/AWQ quantization separately, (3) building servers like vLLM/TGI, and (4) manually configuring CUDA/Metal/ROCm environments. Ollama compresses these four steps into a single step (pull + run) by standardizing the GGUF format. It also version controls system prompts, templates, and parameters along with the model using Modelfiles, and incorporates production-level features such as thinking mode (reasoning models), format=json, and keep_alive. In essence, "if Hugging Face is Git for ML, then Ollama is Docker for LLM."
From the perspective of biomedical researchers, this enables: (1) local analysis of HIPAA/GDPR-protected patient data without transferring it to the cloud, (2) a RAG system backbone โ using a combination of vector DB, embedding models, and LLM inference to search internal papers/protocols, (3) automatic conversion of clinical notes from STT to SOAP format with ICD-10 code suggestions, (4) immediate deployment of domain-specific models like BioGPT, Bio-Llama, and Med-PaLM after converting them to GGUF, and (5) automation of experimental data analysis workflows (e.g., sequencing results โ LLM interprets variants โ generates a draft report). Because it doesn't rely on external APIs, it ensures data sovereignty, research security, and reproducibility.
Key operational tips for production deployment: (a) For thinking mode models (e.g., gpt-oss, qwen3 reasoning), it's essential to explicitly set think:true at the root level; otherwise, responses will be incomplete. (b) For non-thinking models like translation or embedding, think:false is mandatory; setting it to true will result in empty responses. (c) Use the keep_alive option to avoid cold starts (saving 1.5-3 minutes of model loading time). (d) num_ctx should be set to at least 16384, considering the model's context limit and the number of tokens used in thinking mode. (e) Adjust the REST API timeout to a range of 120-600 seconds, depending on the model size and whether thinking mode is enabled.
๐ป System Requirements
Minimum 16GB (7B Q4 model), recommended 32GB (13B), 64GB+ (32B), 128GB+ (70B/120B unified memory model โ Apple M4 Ultra, NVIDIA Grace, AMD Ryzen AI MAX+)
8GB (7B Q4) / 24GB (32B Q4, RTX 4090-class) / 48GB (70B Q4, A6000-class) / 80GB+ (120B or multi-GPU distributed). CPU-only operation is possible, but token processing speed is 5-10 times slower compared to GPU. Apple Silicon (M1 Pro or later) is very efficient due to unified memory.
4-70GB per model (based on Q4 quantization). 1-2TB NVMe SSD recommended for running multiple models. Network storage mounts such as NFS and SMB are also possible (OLLAMA_MODELS environment variable).
โก Installation
curl -fsSL https://ollama.com/install.sh | sh
Or Homebrewbrew install ollama
1. Pull Modelsollama pull llama3.3:70b ollama pull gemma3:12b
2. Interactive Inferenceollama run llama3.3:70b "What are the differences between AlphaFold and ESMFold in protein structure prediction?"
3. REST API (Port 11434, OpenAI Compatible)curl -X POST http://localhost:11434/api/chat -d '{ "model": "llama3.3:70b", "messages": [{"role": "user", "content": "Hello"}], "stream": false, "keep_alive": "24h", "options": {"num_ctx": 16384, "num_predict": 2000} }'
4. Thinking Mode Models (gpt-oss, qwen3 reasoning)curl -X POST http://localhost:11434/api/chat -d '{ "model": "gpt-oss:120b", "messages": [{"role": "user", "content": "..."}], "stream": false, "think": true, "keep_alive": "24h" }'
5. Customize Domain Models with Modelfilecat > Modelfile <<EOF FROM llama3.3:70b SYSTEM "You are a specialized analyst in the field of biotechnology." PARAMETER temperature 0.7 PARAMETER num_ctx 16384 EOF ollama create bio-analyst -f Modelfile
6. Operational Monitoringollama ps # Currently loaded models + GPU usage ollama list # All owned models curl http://localhost:11434/api/tags | jq .
๐งฌ Bio Use Cases
Local Analysis Pipeline for Papers and Experimental Data
Automate processing of data such as PubMed RSS feeds, research notes, and sequencing results using cron + Ollama REST API. Example: Daily processing of 50 new papers โ llama3.3:70b generates abstract summaries + emotion tags + relevance scores โ DRAFT INSERT into the database. Zero external API costs, zero data transfer outside the system.
RAG System Backbone โ Internal Knowledge Search + Chatbot
Vectorize paper PDFs, protocol DOCX files, and research note Markdown files using BGE-M3 embeddings โ Load into Qdrant/ChromaDB โ When a user searches, Ollama gemma/llama infers and combines search results + context. Streamlit/Gradio UI allows anyone to perform natural language queries on internal knowledge.
HIPAA/GDPR-Protected Patient Data EMR Assistant
Host Ollama + medllama3/BioGPT on in-house Mac Studio/workstations โ Automatically convert clinical note STT results to SOAP format via ollama API + suggest ICD-10 codes + check prescriptions. SYSTEM prompt + temperature 0.3 + num_ctx 16384 are baked into the Modelfile. Zero cloud transfer = HIPAA Safe Harbor compliance.
FAQ
What is Ollama?
Ollama is an open-source local LLM execution engine released in 2023 by Ollama Inc. It's an integrated package consisting of a GGUF quantized model based on llama.cpp, a REST API, and a Modelfile (a model definition similar to a Dockerfile). In short, it can be described as "just as Docker standardized container execution, Ollama standardizes local LLM execution." Installation involves a single binary for macOS/Linux/Windows, followed by a single line to download a model (e.g., ollama pull llama3.3:70b) and another line to run it or call the REST API on port :11434, which immediately provides OpenAI-compatible responses. Previously, running local LLMs involved a complex chain of steps: (1) loading models with Hugging Face Transformers, (2) handling bitsandbytes/AWQ quantization separately, (3) building servers like vLLM/TGI, and (4) manually configuring CUDA/Metal/ROCm environments. Ollama compresses these four steps into a single step (pull + run) by standardizing the GGUF format. It also version controls system prompts, templates, and parameters along with the model using Modelfiles, and incorporates production-level features such as thinking mode (reasoning models), format=json, and keep_alive. In essence, "if Hugging Face is Git for ML, then Ollama is Docker for LLM." From the perspective of biomedical researchers, this enables: (1) local analysis of HIPAA/GDPR-protected patient data without transferring it to the cloud, (2) a RAG system backbone โ using a combination of vector DB, embedding models, and LLM inference to search internal papers/protocols, (3) automatic conversion of clinical notes from STT to SOAP format with ICD-10 code suggestions, (4) immediate deployment of domain-specific models like BioGPT, Bio-Llama, and Med-PaLM after converting them to GGUF, and (5) automation of experimental data analysis workflows (e.g., sequencing results โ LLM interprets variants โ generates a draft report). Because it doesn't rely on external APIs, it ensures data sovereignty, research security, and reproducibility. Key operational tips for production deployment: (a) For thinking mode models (e.g., gpt-oss, qwen3 reasoning), it's essential to explicitly set think:true at the root level; otherwise, responses will be incomplete. (b) For non-thinking models like translation or embedding, think:false is mandatory; setting it to true will result in empty responses. (c) Use the keepalive option to avoid cold starts (saving 1.5-3 minutes of model loading time). (d) numctx should be set to at least 16384, considering the model's context limit and the number of tokens used in thinking mode. (e) Adjust the REST API timeout to a range of 120-600 seconds, depending on the model size and whether thinking mode is enabled.
When should I use Ollama?
Standard for running local LLMs โ a runtime that powers 100+ models with a single command.
What is a biomedical use case for Ollama?
Local Analysis Pipeline for Papers and Experimental Data: Automate processing of data such as PubMed RSS feeds, research notes, and sequencing results using cron + Ollama REST API. Example: Daily processing of 50 new papers โ llama3.3:70b generates abstract summaries + emotion tags + relevance scores โ DRAFT INSERT into the database. Zero external API costs, zero data transfer outside the system.
๐ Update Notes
No update notes yet.
๐งช Related Code of Life
No related Code of Life posts yet.