Нема описа

Patrick Devine 3f1b7177f2 pass model and predict options пре 1 година
api 3f1b7177f2 pass model and predict options пре 1 година
app 7974ad58ff fix env var loading пре 1 година
cmd ad84138469 do not pull when local is available пре 1 година
docs 55898a3382 Move python docs to separate file пре 1 година
llama 3f1b7177f2 pass model and predict options пре 1 година
server 3f1b7177f2 pass model and predict options пре 1 година
web 3c3c09a523 set version at build time пре 1 година
.dockerignore 6292f4b64c update `Dockerfile` пре 1 година
.gitignore 9fe018675f use `Makefile` for dependency building instead of `go generate` пре 1 година
.prettierrc.json 8685a5ad18 move .prettierrc.json to root пре 1 година
Dockerfile fdb93ef2aa fix dockerfile пре 1 година
LICENSE df5fdd6647 `proto` -> `ollama` пре 1 година
Makefile 879e996ca4 update app to use go binary пре 1 година
README.md 9f528c12d7 update api documentation пре 1 година
go.mod c4b9e84945 progress пре 1 година
go.sum c4b9e84945 progress пре 1 година
main.go 6093a88c1a add llama.cpp go bindings пре 1 година
models.json 58f416aad8 Update models.json пре 1 година

README.md

ollama

Ollama

Run large language models with llama.cpp.

Note: certain models that can be run with this project are intended for research and/or non-commercial use only.

Features

  • Download and run popular large language models
  • Switch between multiple models on the fly
  • Hardware acceleration where available (Metal, CUDA)
  • Fast inference server written in Go, powered by llama.cpp
  • REST API to use with your application (python, typescript SDKs coming soon)

Install

  • Download for macOS
  • Download for Windows (coming soon)
  • Docker: docker run -p 11434:11434 ollama/ollama

You can also build the binary from source.

Quickstart

Run the model that started it all.

ollama run llama

Example models

💬 Chat

Have a conversation.

ollama run vicuna "Why is the sky blue?"

🗺️ Instructions

Ask questions. Get answers.

ollama run orca "Write an email to my boss."

👩‍💻 Code completion

Sometimes you just need a little help writing code.

ollama run replit "Give me react code to render a button"

📖 Storytelling

Venture into the unknown.

ollama run nous-hermes "Once upon a time"

Advanced usage

Run a local model

ollama run ~/Downloads/vicuna-7b-v1.3.ggmlv3.q4_1.bin

Building

make

To run it start the server:

./ollama server &

Finally, run a model!

./ollama run ~/Downloads/vicuna-7b-v1.3.ggmlv3.q4_1.bin

API Reference

POST /api/pull

Download a model

curl -X POST http://localhost:11343/api/pull -d '{"model": "orca"}'

POST /api/generate

Complete a prompt

curl -X POST http://localhost:11434/api/generate -d '{"model": "orca", "prompt": "hello!", "stream": true}'