Expand description
Embedding-capability mapping (task→heads) and per-alias head requirements, shared by open-time validation and write-time auto-embed routing. Embedding-capability model: which vector heads an alias’s task can produce, and which heads a schema’s auto-embed columns require.
Auto-embed always sources from a text column, so an alias is usable for a column
only if its Uni-Xervo ModelTask can produce — from text — the head that column
needs (dense / sparse / multi-vector). This module is the single source of truth for
that mapping, shared by open-time schema validation in the uni-db crate and by
write-time routing in crate::runtime::writer.
The task→heads mapping is a deliberate allow-list. ModelTask is
#[non_exhaustive], so any task that is not explicitly an embed-from-text task
(image/audio/multimodal embedders, rerankers, generators, …) maps to no heads and
is rejected, rather than silently slipping through when a future variant is added
upstream. The mapping returns the task’s upper bound; a specific hybrid model may
expose fewer heads (its available_heads() is the runtime ground truth), which the
writer enforces at inference time.
Structs§
- Required
Heads - Embedding heads a single alias must produce, with the columns that require them.
Functions§
- required_
embed_ heads - Per-alias embedding-head requirements implied by a schema’s auto-embed indexes.
- text_
embedding_ heads - Vector heads an alias’s
taskcan produce from a text source column.