---
title: "Efficient Table Pre-training without Real Data: An Introduction to TAPEX"
description: "TAPEX pre-trains a language model (BART) for table reasoning by teaching it to act as a neural SQL executor."
url: "https://swe.quest/articles/efficient-table-pre-training-without-real-data-an-introduction-to-tapex-e9ef75c7b74d3891"
canonical: "https://huggingface.co/blog/tapex"
source: "Hugging Face"
published: "2022-05-23"
difficulty: "hard"
kind: "Research"
reading_minutes: 6
tags: ["model-training","llms","machine-learning","sql"]
---

# Efficient Table Pre-training without Real Data: An Introduction to TAPEX

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2022-05-23, 6 min read, Research. Original: [https://huggingface.co/blog/tapex](https://huggingface.co/blog/tapex)

## Summary

TAPEX pre-trains a language model (BART) for table reasoning by teaching it to act as a neural SQL executor. Its training corpus is synthetic: SQL queries are sampled over web tables and executed with a real engine such as MySQL to produce target outputs. Because SQL execution is structurally close to table question answering, TAPEX set new state-of-the-art results on WikiSQL (89.6%), TabFact (84.2%), SQA (74.5%) and WikiTableQuestions (57.5%). It beat TaBERT by 2% using only 2% of the pre-training corpus, roughly a 50x efficiency gain. The takeaway for continual pre-training is to synthesize a small, accurate, program-generated corpus rather than mine large, noisy natural-language data. Models and fine-tuning scripts are available in Hugging Face Transformers.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- transformer language models
- pre-training and fine-tuning ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

TAPEX, BART, Hugging Face Transformers, WikiTableQuestions, TabFact, TAPAS, TaBERT

## Related posts

- [The Agentic Analytics Benchmark, round two: GPT-6, Claude Opus 5.5, Claude Sonnet 5.5](https://swe.quest/articles/the-agentic-analytics-benchmark-round-two-gpt-6-claude-opus-5-5-claude-sonnet-5-f67c49a44d812e12.md): ClickHouse · 2026-10-20 · Medium · 9 min read · Evaluation, AI agents, LLMs, Analytics & OLAP, SQL
  Five new models (GPT-6 Astra, Luna, Sol, Claude Opus 5.5 and Claude Sonnet 5.5) were added to a frozen 201-question agentic text-to-SQL benchmark over a synthetic ClickHouse warehouse.
- [Turning Database Grading into RL Rewards: Post-Training Agents with ThinkingBox](https://swe.quest/articles/turning-database-grading-into-rl-rewards-post-training-agents-with-thinkingbox-9126975f97c5fba4.md): Hugging Face · 2026-10-22 · Hard · 18 min read · Model training, AI agents, Evaluation, LLMs
  Executable checks on terminal database state, originally built to grade agents in ThinkingBox-Bench, double as binary RL rewards for post-training tool-using agents.
- [The Agentic Analytics Benchmark: ranking tables and labeling failures with Jev](https://swe.quest/articles/the-agentic-analytics-benchmark-ranking-tables-and-labeling-failures-with-jev-07d829d8338b82f5.md): ClickHouse · 2026-10-27 · Medium · 15 min read · Evaluation, AI agents, LLMs, SQL, Analytics & OLAP
  Jev, a typed classifier model returning calibrated answers in 70-500 ms, was applied to the Agentic Analytics Benchmark for two jobs: labeling failed text-to-SQL agent runs and ranking warehouse tables per question.
- [The Agentic Analytics Benchmark: Measuring model accuracy and efficiency in analytical agents](https://swe.quest/articles/the-agentic-analytics-benchmark-measuring-model-accuracy-and-efficiency-in-bf2a6cccc514f79e.md): ClickHouse · 2026-09-01 · Medium · 19 min read · Evaluation, AI agents, LLMs, Analytics & OLAP, SQL
  data-agent-mnist is an open harness for benchmarking agentic analytics, built from 201 real questions from ClickHouse's internal agent DWAINE and replayed against a deterministically seeded, anonymized synthetic reconstruction of their dbt warehouse (18 tables, 865 columns).
- [Inside OpenAI’s in-house data agent](https://swe.quest/articles/inside-openai-s-in-house-data-agent-55ba2e68b590558a.md): OpenAI · 2026-01-29 · Medium · 13 min read · AI agents, RAG & retrieval, Analytics & OLAP, Evaluation, LLMs
  OpenAI built an internal GPT-5.2-powered data agent that answers natural-language analytics questions over a platform of 600+ PB and 70k datasets, available via Slack, web, IDEs, Codex CLI and ChatGPT through MCP.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
