Cleo:将Qwen3.5-2B-Base微调为配备统一工具链的完整Text-to-SQL分析师
英文摘要
Cleo is an open-source text-to-SQL model built by finetuning Qwen3.5-2B-Base, designed to encapsulate full analyst behavior within a 2B parameter model. The system uses the same structured harness for training, evaluation, and inference, implementing a gather-repair-answer contract that includes live execution evidence during candidate query search. Key design choices include co-optimization of the model contract, SQL safety layer, dialect handling, timeouts, and clarification behavior. The model, harness, and datasets are fully open-source on GitHub and Hugging Face. This project demonstrates how tightly coupling training and inference in a single harness can enable small models to handle complex SQL generation and interactive debugging.
中文摘要
Cleo是一个开源的text-to-SQL模型,通过微调Qwen3.5-2B-Base实现,旨在用20亿参数模型封装完整的分析师行为。系统在训练、评估和推理中使用同一套结构化工具链,实现“采集-修复-回答”合约,并在候选查询搜索中利用实时执行证据。关键设计包括模型合约、SQL安全层、方言处理、超时和澄清行为的协同优化。模型、工具链和数据集均在GitHub和Hugging Face上完全开源。该项目展示了通过将训练和推理紧密耦合在同一工具链中,小型模型同样能处理复杂的SQL生成和交互式调试。
关键要点
Cleo finetunes Qwen3.5-2B-Base, a 2B parameter model, to act as a full text-to-SQL analyst.
Cleo微调Qwen3.5-2B-Base(20亿参数模型),使其充当完整的text-to-SQL分析师。
Training, evaluation, and inference all use the same gather-repair-answer harness with live SQL execution evidence.
训练、评估和推理均使用相同的“采集-修复-回答”工具链,并利用实时SQL执行证据。
The system co-designs the model contract, SQL safety, dialect support, timeouts, and clarification prompts.
系统协同设计了模型合约、SQL安全、方言支持、超时和澄清提示。
All components—model, harness, and datasets—are fully open-source.
所有组件——模型、工具链和数据集——完全开源。