Gramscii-IT/SemanticRepair-270M
Gramscii-IT/SemanticRepair-270M is a 270 million parameter rewriter model fine-tuned from google/gemma-3-270m, designed to restate user questions into a plain, canonical form for improved routing by an embedding router. It specializes in clarifying ambiguous or complex requests, handling multiple languages, and identifying non-requests, operating with a 32768 token context length. This model's primary function is to enhance the reliability of downstream routing decisions by providing consistent, simplified inputs, rather than answering questions directly.
Loading preview...
SemanticRepair-270M: A Specialized Rewriter for Robust Routing
Gramscii-IT/SemanticRepair-270M is a compact 270 million parameter model, fine-tuned from google/gemma-3-270m, engineered specifically to act as a semantic repair mechanism for embedding routers. Its core function is to rephrase user questions into a plain, standardized format, enabling more accurate and reliable routing to specific capabilities.
Key Capabilities
- Request Rewriting: Transforms complex, conversational, or multi-part questions into clear, single-line requests, or multiple lines for compound questions.
- Multilingual Support: Effectively processes and rewrites requests in multiple languages (e.g., English, Italian, French, German, Spanish), significantly reducing language-related routing errors.
- Non-Request Identification: Accurately identifies and flags messages that are not actionable requests (e.g., greetings, statements), responding with a
NO_REQUESTsentinel. - Robustness: Designed for greedy, deterministic output, ensuring the same input always yields the same rewrite, crucial for reproducible routing decisions.
- Efficiency: Operates with low latency and memory footprint, capable of running on CPU-only setups (e.g., Apple M-series) with minimal resources.
How it Differs
Unlike general-purpose LLMs, SemanticRepair-270M does not answer questions, generate creative text, or make decisions. Its narrow, specialized role is to preprocess user input for a router. It is explicitly trained not to sanitize or soften commands, passing the user's intent faithfully to the router, where decisions about execution or refusal are made. Benchmarks show it significantly improves routing accuracy, especially for multilingual inputs, compared to an untrained base model, by abstaining rather than guessing when uncertain. It was trained on a unique dataset of 84,819 message-to-request pairs, including specific categories for handling injections and complex linguistic patterns.