# Agentic SQL for Free with Qwen3.8 27B and DuckDB

DevFeed: [Agentic SQL for Free with Qwen3.8 27B and DuckDB](<https://devfeed.tech/articles/agentic-sql-for-free-with-qwen3-8-27b-and-duckdb-78930.md>)

Original publisher: [Read original article](<https://motherduck.com/blog/Agentic-SQL-for-Free-with-Qwen3.8-27B-and-DuckDB>)

Author: Alex Monahan

Published: 2026-08-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [MotherDuck](<https://devfeed.tech/sources/motherduck.md>)

Topics: [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [quantization](<https://devfeed.tech/topics/quantization.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [can](<https://devfeed.tech/tags/can.md>), [cost](<https://devfeed.tech/tags/cost.md>), [data](<https://devfeed.tech/tags/data.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [electricity](<https://devfeed.tech/tags/electricity.md>), [gpt-5](<https://devfeed.tech/tags/gpt-5.md>), [gpt-5-6](<https://devfeed.tech/tags/gpt-5-6.md>), [laptop](<https://devfeed.tech/tags/laptop.md>), [qwen](<https://devfeed.tech/tags/qwen.md>), [qwen3](<https://devfeed.tech/tags/qwen3.md>), [qwen3-8-27b](<https://devfeed.tech/tags/qwen3-8-27b.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

The article benchmarks Qwen3.8 27B running locally with DuckDB for agentic SQL tasks, then explains how to set up the model and tune it for different laptop hardware. It reports strong benchmark accuracy and low electricity costs while noting that local inference is slower and hardware-dependent.

## Source excerpt

If your laptop has 16GB of RAM, your agent can write SQL locally for free with Qwen3.8 27B. On the DABstep SQL benchmark, Qwen beat GPT 5.6 Luna and cost under 50 cents in electricity, over 17x less. Add DuckDB and you have a data analyst that runs on your own machine. This post covers the benchmark results and walks through the setup, including which quantized model to download for your laptop.