Views
No views yet
TextEmbedder:1let embedder = try await TextEmbedder() // downloads this repo
2let doc = try await embedder.embed(document: "Tokyo is the capital of Japan.")
3let query = try await embedder.embed(query: "what is the capital of Japan")
4let score = TextEmbedder.cosineSimilarity(doc, query)task: search result | query: / title: none | text: )
are applied automatically by TextEmbedder.model/
├── embeddinggemma-300m_float32_static.aimodel
├── tokenizer/ (HF tokenizer files)
└── reference.json (torch reference cosines used by the parity test)| name | shape | dtype | |
|---|---|---|---|
| input | input_ids | [1, 256] | int32 (pad id 0, mask 0 over padding) |
| input | attention_mask | [1, 256] | int32 |
| output | embedding | [1, 768] | fp32, L2-normalized |