Code Monkey home page Code Monkey logo

llama-3-8b-instruct-text2sql's Introduction

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

项目简介

该模型可以接受中文自然语言指令并转换为SQL查询语句。

新闻

[2024/07/18] 发布 llama-3-8B-sqlcorder-chinese-Instruct-gguf ,对中文对话能力进行微调,进行了中文text2sql的微调:hungingface 地址

接下来方向

  • 放出 LLaMA-Factory 微调教程
  • 如何使用测试集进行测试

模型指标

  • 更新日期: 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
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-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
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

训练数据

本项目初期使用的训练数据集为 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个不同领域的多个表的数据库。
  • WikiSQL:2017/09,Salesforce提出了一个大型Text-to-SQL数据集WikiSQL,数据来自Wikipedia,属于单个域,包含80,654个自然语言问题和77,840条SQL语句。 SQL语句的形式比较简单,不包含排序、分组、子查询等复杂操作。

下载地址

模型名称 完整版 LoRA版 GGUF版
llama-3-8B-Instruct-text2sql
(基于Llama-3-Chinese-8B-Instruct-v2)
[🤗Hugging Face]
[🤖ModelScope]
[wisemodel]
[🤗Hugging Face]
[🤖ModelScope]
[wisemodel]
llama-3-8B-sqlcorder-chinese-Instruct-gguf
(基于llama-3-8b-sqlcorder)
[🤗Hugging Face]

贡献者

sensen

许可证

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

如何参与

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

llama-3-8b-instruct-text2sql's People

Contributors

dusens avatar senjiasen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.