Something went wrong. Try again.
Routing embedding stack for Qwen3-Embedding-0.6B on Apple Silicon: orchestrator + MLX + llama.cpp backends
Something went wrong. Try again.
520 B · 15 lines
Rust
at main
12345678910111213141516use crate::dto::InputKind;
const DEFAULT_TASK: &str = "Given a web search query, retrieve relevant passages that answer the query";
/// Wrap text with the appropriate instruction prefix for the given input kind.////// - `Document` -> text unchanged/// - `Query` -> `"Instruct: <task>\nQuery: <text>"`pub fn wrap(text: &str, kind: InputKind) -> String { match kind { InputKind::Document => text.to_string(), InputKind::Query => format!("Instruct: {DEFAULT_TASK}\nQuery: {text}"), }}