llm-embed-ollama
LLM plugin providing access to embedding models running on local Ollama server.
Installation
Install this plugin in the same environment as LLM.
llm install llm-embed-ollama
Background
Ollama provides Few embedding models. This plugin enables the usage of those models using llm and ollama embeddings..
To utilize these models, you need to have an instance of the Ollama server running.
See also Embeddings: What they are and why they matter for background on embeddings and an explanation of the LLM embeddings tool.
See also Ollama Embeddings Models Blog
Usage
This plugin adds support for the following embedding models available in ollama:
- all-minilm
- nomic-embed-text
- mxbai-embed-large
- bge-large: Embedding model from BAAI mapping texts to vectors.
- bge-m3: BGE-M3 is a new model from BAAI distinguished for its versatility in Multi-Functionality, Multi-Linguality, and Multi-Granularity.
The models needs to be downloaded. Using `ollama pull the first time you try to use them.
See the LLM documentation for everything you can do.
To get started embedding a single string, run the following:
Make sure you have the appropriate ollama model.
ollama pull all-minilm
llm embed -m all-minilm -c 'Hello world'
This will output a JSON array of 384 floating point numbers to your terminal.
To calculate and store embeddings for every README in the current directory (try this somewhere with a node_modules directory to get lots of READMEs) run this:
llm embed-multi ollama-readmes \
-m all-minilm \
--files . '**/README.md' --store
Then you can run searches against them like this:
llm similar ollama-readmes -c 'utility functions'
Add | jq to pipe it through jq for pretty-printed output, or | jq .id to just see the matching filenames.
Prefix and suffix support
Some embedding models expect prefixed or suffixed input (for example, instruction-style or query embeddings).
This plugin supports optional embedding prefixes and suffixes provided by llm. When a prefix or suffix is set on the embedding model, it is automatically applied before generating embeddings.
Example (Python):
import llm
model = llm.get_embedding_model("all-minilm")
model.prefix = "query: "
embedding = model.embed("hello world")
This is useful for models that distinguish between query and document embeddings.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-embed-ollama
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for llm-embed-ollama 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_embed_ollama-0.1.3.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_embed_ollama-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / llm_embed_ollama-0.1.3.tar.gz
| Download URL | llm_embed_ollama-0.1.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddeb62719ea69aa1e7b73fe218022c4b5d89e132aba3862692ee933f80ce3d42
|
|
BLAKE2b-256 checksum How to use checksums |
db12ddb0b7a537ad264f92cf9013685a38c883db874616a1c23121c8a7b73ecd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency logRelease files / llm_embed_ollama-0.1.3-py3-none-any.whl
| Download URL | llm_embed_ollama-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
194e7d388dc5f3db88c089436a9c85d6c7da6ff8ac2a22f5de8bee7cd68f9978
|
|
BLAKE2b-256 checksum How to use checksums |
c674ce8220c4161d779394a4a76d442da159cb7808c62487bd3d249ceb5af9f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency log