Bruce MacDonald a12df7faf4 fix build
2023-06-27 12:32:21 -04:00
2023-06-26 15:57:13 -04:00
2023-06-27 11:41:54 -04:00
2023-06-26 13:41:16 -04:00
2023-06-27 12:12:44 -04:00
2023-06-26 15:57:13 -04:00
2023-06-27 12:32:21 -04:00
2023-06-27 12:32:21 -04:00
2023-06-27 12:08:52 -04:00
2023-06-27 12:12:44 -04:00
2023-06-27 12:32:21 -04:00

Ollama

  • Run models, fast
  • Download, manage and import models

Install

pip install ollama

Example quickstart

import ollama
model_name = "huggingface.co/thebloke/llama-7b-ggml"
model = ollama.pull(model_name)
ollama.load(model)
ollama.generate(model_name, "hi")

Reference

ollama.load

Load a model from a path or a docker image

ollama.load("model name")

ollama.generate("message")

Generate a completion

ollama.generate(model, "hi")

ollama.models

List models

models = ollama.models()

ollama.serve

Serve the ollama http server

Cooing Soon

ollama.pull

Examples:

ollama.pull("huggingface.co/thebloke/llama-7b-ggml")

ollama.import

Import an existing model into the model store

ollama.import("./path/to/model")

ollama.search

Search for compatible models that Ollama can run

ollama.search("llama-7b")

Future CLI

ollama run huggingface.co/thebloke/llama-7b-ggml
Description
Get up and running with Llama 2, Mistral, and other large language models.
Readme MIT 182 MiB
Languages
Go 93.3%
C 2.6%
Shell 1.2%
TypeScript 1%
PowerShell 0.8%
Other 1%