// PYTHON LIBRARY
embed()
`df.omna.embed(column)` vectorizes a text column once and saves the index to disk, so every later [`search`](/docs/search) and [`filter`](/docs/filter) call loads it in milliseconds. It runs entirely on-device — no API key, no network.
Signature
df.omna.embed(column)| Parameter | Description |
|---|---|
column | The name of the text column to vectorize |
How it works
Omna converts the column to 768-dimensional vectors using FastEmbed with the nomic-ai/nomic-embed-text-v1.5 model (local ONNX — the same embedding model the Omna Mac app uses). The model downloads once on first use. The result is saved to .omna/{column}.parquet next to your work.
import polars as pl
import omna
df = pl.read_csv("documents.csv")
df.omna.embed("text")
# → writes .omna/text.parquetRun embed() once per column. [search](/docs/search) and [filter](/docs/filter) load the saved index automatically on every subsequent call — you only re-run embed() when the data changes.
Embedding time is a one-time cost
| Hardware | 50k rows |
|---|---|
| MacBook Air M5 | ~45 min |
| MacBook Pro M4 Max | ~15 min |
| AWS GPU instance | ~2 min |
Note: No GPU is required. FastEmbed runs on CPU via ONNX, and uses CoreML automatically on Apple Silicon. After the one-time embed, search and filter run in milliseconds from the saved index.