Embedding profiles
Reference for EmbeddingProfile — the frozen record that names a vector space and, via space_id(), gates which embedder can reopen or attach to a collection.
An EmbeddingProfile is the identity card of a vector space. Every embedder carries one, every saved collection stores one, and Telys uses its space_id() to decide whether an embedder may attach to a collection. Vectors from two different spaces are never comparable, so this record keeps a collection honest across reopen and re-attach.
from telys.embedding import EmbeddingProfileSignature
EmbeddingProfile(
provider,
model_id,
model_version,
dimension,
dtype="float32",
normalization="l2",
distance="ip",
pooling="none",
tokenizer_hash="",
projection_version="",
created="",
)A frozen dataclass — instances are immutable. Construct a new one to describe a new space.
Fields
provider
str
(required)
Who produces the vectors, e.g. "openai", "algenta", "local".
model_id
str
(required)
Model name, e.g. "text-embedding-3-small", "bigram".
model_version
str
(required)
Version tag; bump it when the model's weights or behavior change.
dimension
int
(required)
Vector width D. Must equal the collection dim and what the embedder returns.
dtype
str
"float32"
Element type of the emitted vectors.
normalization
str
"l2"
Norm your vectors carry ("l2" = unit length, "none" = raw).
distance
str
"ip"
Similarity used at search time ("ip" = inner product; equals cosine on L2-normalized vectors).
pooling
str
"none"
How tokens are pooled, e.g. "bigram-hash", "multigram-hash", "none".
tokenizer_hash
str
""
Optional tokenizer digest, for models where tokenization defines the space.
projection_version
str
""
Optional tag for a post-embedding projection/reduction.
created
str
""
Provenance timestamp. Bookkeeping only — see below.
Methods
space_id()
str
"sha256:" plus 16 hex characters — a stable digest of the space-defining fields.
compatible_with(other)
bool
True when self.space_id() == other.space_id().
as_dict()
dict
The field values. A saved collection stores this as embedder_profile.
What defines space identity
space_id() digests the fields that determine whether vectors are comparable — provider/model identity, dimension, dtype, normalization, distance, pooling, and the tokenizer/projection tags. Change any of them and you have declared a new space:
Because created stays out of the digest, a collection saved yesterday still matches a freshly built provider you register today — reopen keeps working across time.
How identity gates reopen and attach
The profile is the contract enforced when an embedder meets a collection:
Inspect a stored profile
See also
Embeddings & vector spaces — the concept behind spaces.
Dimensions & space IDs — dimension rules and how to migrate a space.
CallableEmbedder (bring your own) — build a profile for your own model.
Embedders API — the full
telys.embeddingsurface.
Last updated
Was this helpful?