MCPcopy Create free account
hub / github.com/acking-you/static_flow / dim

Method dim

crates/embedding/src/text.rs:50–59  ·  view source on GitHub ↗

Embedding dimension for each model (from fastembed model list).

(self)

Source from the content-addressed store, hash-verified

48impl TextEmbeddingModel {
49 /// Embedding dimension for each model (from fastembed model list).
50 pub const fn dim(self) -> usize {
51 match self {
52 TextEmbeddingModel::BgeSmallEnV15 => 384,
53 TextEmbeddingModel::BgeBaseEnV15 => 768,
54 TextEmbeddingModel::BgeLargeEnV15 => 1024,
55 TextEmbeddingModel::BgeSmallZhV15 => 512,
56 TextEmbeddingModel::BgeLargeZhV15 => 1024,
57 TextEmbeddingModel::ClipVitB32 => 512,
58 }
59 }
60
61 /// Map to the underlying fastembed enum.
62 #[cfg(not(target_arch = "wasm32"))]

Callers 2

text.rsFile · 0.45

Calls

no outgoing calls