Edit model card

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

项目名称:llama-3-8B-Instruct-text2sql

项目简介

模型介绍 该版本是 基于 Llama-3-Chinese-8B-Instruct-v2 进行的微调 项目地址:(https://github.com/dusens/llama-3-8B-Instruct-text2sql)

训练数据

本项目初期使用的训练数据集为 CSPIDER 中文数据集 Spider数据集 BIRD-SQL 数据集,该数据集包含多种数据库环境下的中文到SQL的查询转换样本。 我们计划在后续阶段引入更多样的中文文本到SQL的样本,以增强模型的泛化能力和准确性。

  • Spider: 一个跨域的复杂text2sql数据集,包含了10,181条自然语言问句、分布在200个独立数据库中的5,693条SQL,内容覆盖了138个不同的领域。
  • BIRD-SQL:数据集是一个英文的大规模跨领域文本到SQL基准测试,特别关注大型数据库内容。该数据集包含12,751对文本到SQL数据对和95个数据库,总大小为33.4GB,跨越37个职业领域。BIRD-SQL数据集通过探索三个额外的挑战,即处理大规模和混乱的数据库值、外部知识推理和优化SQL执行效率,缩小了文本到SQL研究与实际应用之间的差距。
  • CSpider:2019年9月,西湖大学提出了一个大型中文数据集CSpider,用于复杂和跨领域的语义解析和Text-to-SQL任务,由2位NLP研究人员和1位计算机专业学生从数据集Spider翻译而来,其中包含200个数据库上的10181个问题和5693个独特的复杂SQL查询,具有涵盖138个不同领域的多个表的数据库。

模型架构

微调模型采用的是 Llama-3-Chinese-8B-Instruct-v2 版本,

功能和特点

  • 自然语言理解:能够准确理解中文自然语言输入。
  • SQL生成:基于理解的内容生成符合逻辑的SQL查询语句。

模型指标

  • 更新日期: 2024/05/11
  • 评价指标: execution accuracy (ex)
Model Method Easy Medium Hard Extra All
llama-3-8B-Instruct-text2sql lora 0.938 0.782 0.581 0.524 0.768
qlora 0 0 0 0 0
base 0.297 0.245 0.151 0.095 0.230
Llama2-7B-Chat lora 0.887 0.641 0.489 0.331 0.626
qlora 0.847 0.623 0.466 0.361 0.608
base 0 0 0 0 0
Llama2-13B-Chat lora 0.907 0.729 0.552 0.343 0.68
qlora 0.911 0.7 0.552 0.319 0.664
base 0.214 0.177 0.092 0.036 0.149
CodeLlama-7B-Instruct lora 0.923 0.756 0.586 0.349 0.702
qlora 0.911 0.751 0.598 0.331 0.696
base 0.698 0.601 0.408 0.271 0.539
CodeLlama-13B-Instruct lora 0.94 0.789 0.684 0.404 0.746
qlora 0.94 0.774 0.626 0.392 0.727
base 0.577 0.352 0.201 0.066 0.335
Baichuan2-7B-Chat lora 0.871 0.63 0.448 0.295 0.603
qlora 0.891 0.637 0.489 0.331 0.624
base 0.581 0.413 0.264 0.187 0.392
Baichuan2-13B-Chat lora 0.903 0.702 0.569 0.392 0.678
qlora 0.895 0.675 0.58 0.343 0.659
base 0.395 0.256 0.138 0.042 0.235
Qwen-7B-Chat lora 0.855 0.688 0.575 0.331 0.652
qlora 0.911 0.675 0.575 0.343 0.662
base 0.871 0.632 0.368 0.181 0.573
Qwen-14B-Chat lora 0.895 0.702 0.552 0.331 0.663
qlora 0.919 0.744 0.598 0.367 0.701
base 0 0 0 0 0
ChatGLM3-6b lora 0.855 0.605 0.477 0.271 0.59
qlora 0.843 0.603 0.506 0.211 0.581

下载地址

模型名称 完整版 LoRA版 GGUF版
llama-3-8B-Instruct-text2sql
(指令模型)
[🤗Hugging Face]
[🤖ModelScope]
[wisemodel]
[🤗Hugging Face]
[🤖ModelScope]
[wisemodel]

贡献者

sensen

许可证

本项目采用 MIT 许可证。详细许可信息可以在项目仓库的LICENSE文件中找到。

如何参与

欢迎对中文处理和SQL生成感兴趣的开发者加入我们的项目。你可以通过 GitHub Issue 或 Pull Request 的方式参与项目贡献。

Downloads last month
45
Unable to determine this model's library. Check the docs .