EphAsad/Mnemosyne-3B
EphAsad/Mnemosyne-3B is a 3.1 billion parameter QLoRA fine-tune of Qwen/Qwen2.5-Coder-3B-Instruct, specialized for natural language to SQL generation. It excels in laboratory, scientific, food safety, water quality, and environmental microbiology database schemas, offering low-latency local or server-side SQL generation. This model is optimized for generating correct, well-formatted SQL queries from natural language questions against a provided database schema.
Loading preview...
Mnemosyne-3B: Specialized Text-to-SQL for Scientific Domains
Mnemosyne-3B, developed by Zain Asad, is a 3.1 billion parameter QLoRA fine-tune of the Qwen2.5-Coder-3B-Instruct model. Its primary distinction lies in its specialization for natural language to SQL generation within specific scientific and laboratory contexts. The model is particularly adept at handling database schemas related to laboratory information management systems (LIMS), food and water testing, and environmental microbiology.
Key Capabilities and Features
- Domain Specialization: Fine-tuned on a custom dataset for laboratory, scientific, food safety, and water quality database schemas, showing a +48% execution accuracy (EX) improvement on these tasks compared to its base model.
- Text-to-SQL Generation: Generates SQL queries from natural language questions, requiring a database schema to be provided at inference time.
- Low-Latency Inference: Designed for efficient local or server-side SQL generation, available in bf16 precision and GGUF formats (Q4_K_M, Q8_0) for
llama.cpp, Ollama, and LM Studio. - Robust Training: Trained on a combined dataset of ~40,579 examples, including general SQL foundations, complex SQL structures, and a purpose-built Mnemosyne Lab Dataset covering various complexity tiers.
- Evaluation Metric: Evaluated using execution accuracy (EX), the gold standard for text-to-SQL, rather than exact match, to ensure functional correctness.
Intended Use Cases
- Laboratory Information Management Systems (LIMS): Ideal for generating queries in LIMS, food and water testing, and scientific data management applications.
- Developer Tooling: Useful for data analyst assistants and schema-aware chatbots requiring SQL generation.
- Local Inference: Suited for scenarios where low-latency, local SQL generation is a priority.
Limitations
While highly specialized, Mnemosyne-3B exhibits a modest regression on general cross-domain SQL tasks (e.g., Spider benchmark) compared to its base model. It requires a schema at inference time, and performance on extremely complex, multi-CTE, or deeply nested queries may be limited by its 3B parameter size. SQL outputs should always be reviewed by a human before execution in production systems.