<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/kviac2ftm" -->

---
title: distil-labs/distil-text2sql: Query your data in plain...
description: A fine-tuned 4B parameter language model converts natural language questions into SQL queries with 80% accuracy, matching a 685B teacher model while being 170x...
canonical: https://daily.dev/posts/kviac2ftm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model | daily.dev
og:description: A fine-tuned 4B parameter language model converts natural language questions into SQL queries with 80% accuracy, matching a 685B teacher model while being 170x...
og:url: https://daily.dev/posts/kviac2ftm
og:image: https://api.daily.dev/og/posts/kviAc2fTm.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model

**[The Archives](https://daily.dev/sources/thearchives)** · [@fuongz](https://daily.dev/fuongz) · 0 upvotes · 0 comments

## Summary

A fine-tuned 4B parameter language model converts natural language questions into SQL queries with 80% accuracy, matching a 685B teacher model while being 170x smaller. The model runs locally without API dependencies, supports CSV data querying, and includes a 0.6B variant for edge deployment. Training used synthetic data expansion from 50 seed examples to 10,000 examples, achieving better exact match scores than the teacher model. Available in multiple formats including 4-bit quantized GGUF at 2.5GB for local deployment.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/distil-labs/distil-text2sql>

## Similar posts on daily.dev

- [Text-to-SQL is a definition problem: build the canonical model first](https://daily.dev/posts/text-to-sql-is-a-definition-problem-build-the-canonical-model-first-yhnvzkidi) · dltHub · 0 upvotes · 0 comments
- [Your Data Model Is the Semantic Layer](https://daily.dev/posts/your-data-model-is-the-semantic-layer-ro8bktzht) · MotherDuck · 0 upvotes · 0 comments
- [Cut Text2SQL token costs up to 81%, and stop paying for wrong answers: a Neo4j semantic layer across BigQuery and Databricks](https://daily.dev/posts/cut-text2sql-token-costs-up-to-81-and-stop-paying-for-wrong-answers-a-neo4j-semantic-layer-across-w7f20iaii) · neo4j · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#python](https://daily.dev/tags/python), [#nlp](https://daily.dev/tags/nlp), [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/kviac2ftm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/kviac2ftm","headline":"distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model","text":"Shared: distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model","url":"https://daily.dev/posts/kviac2ftm","datePublished":"2026-01-28T16:09:30.156Z","dateModified":"2026-01-28T16:09:30.158Z","author":{"@type":"Person","name":"Phuong Phung","url":"https://daily.dev/fuongz","image":"https://media.daily.dev/image/upload/v1675072472/avatars/avatar_0O9EgUWWgNzi1prdQaUWo.jpg","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1185}},"image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/OIQTlfFba"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/thearchives","name":"The Archives"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Archives","item":"https://daily.dev/squads/thearchives"},{"@type":"ListItem","position":3,"name":"distil-labs/distil-text2sql: Query your data in plain English with a fine-tuned Text2SQL model"}]}
```

