> For the complete documentation index, see [llms.txt](https://riteshs4hu.gitbook.io/infosec-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riteshs4hu.gitbook.io/infosec-notes/artificial-intelligence/ai-agents/ollama.md).

# Ollama

[Ollama](https://ollama.com/) lets you run large language models (LLMs) locally or use Ollama Cloud models.

### Model Categories

* [Tool Models](https://ollama.com/search?c=tools\&page=5) — Models that support tool calling. Some models listed in this category may not actually support tool calling. Use `ollama show <model>` to verify the model capabilities.
* [Embedding Models](https://ollama.com/search?c=embedding) — Models designed for generating embeddings for RAG.
* [Cloud Models](https://ollama.com/search?c=cloud) — Models hosted on Ollama Cloud. An Ollama account is required to use these models. Log in to the Ollama CLI before using it.

***

### Installation

```bash
curl -fsSL https://ollama.com/install.sh | sh
```

***

#### Run a Model

The model will be downloaded automatically if it is not already available locally.

```bash
ollama run qwen2.5
```

#### List Installed Models

```bash
ollama list
```

#### Show Model Information

```bash
ollama show qwen2.5:latest
```

***

### Using Ollama with Python

{% embed url="<https://dev.to/shreyvijayvargiya/running-deepseek-locally-ollama-and-langchain-142n>" %}

{% embed url="<https://python.langchain.com/docs/integrations/chat/ollama/>" %}

***

### Ollama Cloud Models

* GPT-OSS

```bash
ollama run gpt-oss:20b-cloud
```

* nemotron-3-ultra

```
ollama run nemotron-3-ultra:cloud
```

***

### Listen to Ollama on all interfaces&#x20;

* Linux (temporary)

```
systemctl stop ollama
```

```
OLLAMA_HOST=0.0.0.0 ollama serve
```
