mirror of
https://github.com/cloudstack-llc/ollama.git
synced 2026-07-21 01:55:23 -04:00
a0527284126ffbc17031f75d2bfbf9cf2ca9c907
Ollama
- Run models easily
- Download, manage and import models
Install
pip install ollama
Example quickstart
import ollama
ollama.generate("./llama-7b-ggml.bin", "hi")
Reference
ollama.generate(model, message)
Generate a completion
ollama.generate("./llama-7b-ggml.bin", "hi")
ollama.load(model)
Load a model for generation
ollama.load("model")
ollama.models()
List available local models
models = ollama.models()
ollama.serve()
Serve the ollama http server
Cooming Soon
ollama.pull(model)
Download a model
ollama.pull("huggingface.co/thebloke/llama-7b-ggml")
ollama.import(filename)
Import a model from a file
ollama.import("./path/to/model")
ollama.search("query")
Search for compatible models that Ollama can run
ollama.search("llama-7b")
Future CLI
In the future, there will be an ollama CLI for running models on servers, in containers or for local development environments.
ollama generate huggingface.co/thebloke/llama-7b-ggml "hi"
> Downloading [================> ] 66.67% (2/3) 30.2MB/s
Documentation
Languages
Go
90.7%
C
3.4%
Shell
1.7%
TypeScript
1.3%
Makefile
0.9%
Other
1.8%