embeddings
diapason.tools.storage.embeddings
¶
Embeddings abstraction for dense retrieval backends.
Embedder
¶
OllamaEmbedder
¶
Bases: Embedder
Embedder backed by an Ollama server's /api/embed endpoint.
Sends batches in parallel (up to max_parallel) since Ollama
serializes items within a single HTTP request but happily serves
multiple concurrent connections.
Parameters¶
model:
Ollama model tag; defaults to nomic-embed-text (768-dim).
base_url:
Ollama server base URL. Defaults to http://localhost:11434.
batch_size:
Items per HTTP request. Tuned for Ollama — larger batches help
throughput but increase memory on the server.
max_parallel:
How many concurrent HTTP requests to issue. Ollama CPU/GPU
saturation is typically hit around 8.
timeout_s:
Per-request timeout.