[Ollama](https://ollama.com/) was originally launched to make available the open-source LLM offered by Meta called Llama. It now offers [many different models](https://ollama.com/search) in one convenient package.
## install ollama
Download the [Ollama](https://ollama.com/) installer by clicking the download on the home page. Select the correct installer for your operating system. Find the executable in your `Downloads/` folder and run the installer (all you have to do is click Install).
> [!Example]- Installation Screens
> 
>
>
Open [[Git Bash]] or [[Windows PowerShell]] to run one of the LLMs. To run `llama3.2`, use
```bash
ollama run llama3.2
```
This might take a few minutes depending on the size and your internet connection.
Once the model is loaded, ask a question
```bash
What is the airspeed velocity of an unladen swallow?
```
To quit the session
```bash
/exit
```
# serve ollama locally
Ollama can be served locally on `localhost` to enable endpoint API calls. This should happen automatically if you opt to run `ollama` on start. If you visit [http://localhost:11434/](http://localhost:11434/) you should see the message `Ollama is running`. If not, open [[Bash]] and enter `ollama serve`.
# ollama package
The `ollama` package is a [[Python]] library for running LLMs. Make sure you to [[serve ollama locally]].
```python
import ollama
MODEL = "llama3.2"
messages = [
{"role": "user", "content": "Describe some of the business applications of Generative AI"}
]
response = ollama.chat(model=MODEL, messages=messages)
print(response['message']['content'])
```