No description
Find a file
Michael Yang 50f5adb09b
Merge pull request #12 from jmorganca/prompt-templates-redux
add prompt templates as j2 templates
2023-06-28 11:53:50 -07:00
desktop update README.md with instructions for poetry 2023-06-28 11:47:37 -04:00
docs move desktop docs to desktop/ 2023-06-28 11:29:29 -04:00
ollama add prompt templates as j2 templates 2023-06-28 11:51:54 -07:00
.gitignore add templates to prompt command 2023-06-26 13:41:16 -04:00
build.py desktop: fixes for initial publish 2023-06-27 14:34:56 -04:00
LICENSE proto -> ollama 2023-06-26 15:57:13 -04:00
poetry.lock add prompt templates as j2 templates 2023-06-28 11:51:54 -07:00
pyproject.toml add prompt templates as j2 templates 2023-06-28 11:51:54 -07:00
README.md fix spelling 2023-06-28 14:39:43 -04:00
requirements.txt add prompt templates as j2 templates 2023-06-28 11:51:54 -07:00

Ollama

Run ai models locally.

Note: this project is a work in progress. The features below are still in development

Features

  • Run models locally on macOS (Windows, Linux and other platforms coming soon)
  • Ollama uses the fastest loader available for your platform and model (e.g. llama.cpp, Core ML and other loaders coming soon)
  • Import models from local files
  • Find and download models on Hugging Face and other sources (coming soon)
  • Support for running and switching between multiple models at a time (coming soon)
  • Native desktop experience (coming soon)
  • Built-in memory (coming soon)

Install

pip install ollama

Quickstart

% ollama run huggingface.co/TheBloke/orca_mini_3B-GGML
Pulling huggingface.co/TheBloke/orca_mini_3B-GGML...
Downloading [================>          ] 66.67% (2/3) 30.2MB/s

...
...
...

> Hello

Hello, how may I help you?

Python SDK

Example

import ollama
ollama.generate("orca-mini-3b", "hi")

ollama.generate(model, message)

Generate a completion

ollama.generate("./llama-7b-ggml.bin", "hi")

ollama.models()

List available local models

models = ollama.models()

ollama.serve()

Serve the ollama http server

ollama.serve()

ollama.add(filepath)

Add a model by importing from a file

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

ollama.load(model)

Manually a model for generation

ollama.load("model")

ollama.unload(model)

Unload a model

ollama.unload("model")

ollama.pull(model)

Download a model

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

Coming Soon

ollama.search("query")

Search for compatible models that Ollama can run

ollama.search("llama-7b")

Documentation