Docs: titan-embed-text-v2 input format and cost
Browse files23 unmodified lines2425262728293023 unmodified lines| others (paraphrase-multilingual, granite, Mistral-Embed) | raw text | raw text | model config || OpenAI text-embedding-3-small (API) | raw text, first 512 tokens (cl100k_base) | raw text, first 512 tokens | API (1,536-d; Matryoshka rows = first 1024/512/256 dims re-normalised) |Models are pinned to the Hugging Face commit downloaded on 2026-12-03. API models: OpenAI models through the **Batch API** (50% price; text-embedding-3-small ≈ $0.93), and Gemini (embedding-2, embedding-001) / Voyage / Perplexity through **OpenRouter** (≈ $22.5 for all four). Added later through OpenRouter: Cohere embed-5-fast / embed-5-pro (input_type search_query / search_document; ≈ $4.8 and $6.3) and Perplexity pplx-embed-v1-4b / pplx-embed-v2-context-0.6b (≈ $1.8 and $1.1; the context model embeds each document on its own, without multi-chunk context). All API inputs are cut to the first 512 tokens with the cl100k_base tokenizer, because the providers' own tokenizers aren't public. Precision: bf16, except the Zalo Legal, translated and English scores of Qwen3-Embedding-4B and BGE-M3 (fp16) and EmbeddingGemma 2 (fp32). A check on Qwen3-Embedding-4B (7 datasets) found fp16, bf16 and fp32 encoding within 0.5 nDCG@10 of each other (mean gap to fp32: 0.08 for fp16, 0.18 for bf16).## 3. Hybrid retrieval (BGE-M3)23 unmodified lines2425262728293023 unmodified lines| others (paraphrase-multilingual, granite, Mistral-Embed) | raw text | raw text | model config || OpenAI text-embedding-3-small (API) | raw text, first 512 tokens (cl100k_base) | raw text, first 512 tokens | API (1,536-d; Matryoshka rows = first 1024/512/256 dims re-normalised) |Models are pinned to the Hugging Face commit downloaded on 2026-12-03. API models: OpenAI models through the **Batch API** (50% price; text-embedding-3-small ≈ $0.93), and Gemini (embedding-2, embedding-001) / Voyage / Perplexity through **OpenRouter** (≈ $22.5 for all four). Added later through OpenRouter: Cohere embed-5-fast / embed-5-pro (input_type search_query / search_document; ≈ $4.8 and $6.3) and Perplexity pplx-embed-v1-4b / pplx-embed-v2-context-0.6b (≈ $1.8 and $1.1; the context model embeds each document on its own, without multi-chunk context). Amazon titan-embed-text-v2 through OpenRouter: plain text (≈ $1.9). All API inputs are cut to the first 512 tokens with the cl100k_base tokenizer, because the providers' own tokenizers aren't public. Precision: bf16, except the Zalo Legal, translated and English scores of Qwen3-Embedding-4B and BGE-M3 (fp16) and EmbeddingGemma 2 (fp32). A check on Qwen3-Embedding-4B (7 datasets) found fp16, bf16 and fp32 encoding within 0.5 nDCG@10 of each other (mean gap to fp32: 0.08 for fp16, 0.18 for bf16).## 3. Hybrid retrieval (BGE-M3)
docs/methodology.md+1-1