Using SQLCoder 7B 2 on Cloudflare Workers AI

Implementation guide · SQLCoder · Defog.ai

ServerlessOpen Weights

Cloudflare Workers AI exposes SQLCoder 7B 2 through model ID @cf/defog/sqlcoder-7b-2. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.

Last refreshed 2026-05-19. Next refresh: weekly.

Quick Start

  1. 1
    Create an account at Cloudflare Workers AI and generate an API key.
  2. 2
    Use the Cloudflare Workers AI SDK or REST API to call @cf/defog/sqlcoder-7b-2 — see the documentation for request format.

Code Examples

See Cloudflare Workers AI documentation for integration details.

Pricing on Cloudflare Workers AI

Capabilities

No model capability flags are currently sourced.

About SQLCoder 7B 2

SQLCoder-7B-2 is a large language model developed by Defog, Inc., designed to translate natural language questions into SQL queries, effectively bridging the gap for non-technical users to interact with databases. With its 7 billion parameters, this model is fine-tuned from the CodeLlama-7B base and operates efficiently on consumer-grade hardware. Its key capabilities include high accuracy in text-to-SQL tasks, particularly with complex queries like joins, while focusing on PostgreSQL syntax. SQLCoder-7B-2 is accessible via open-source platforms like Hugging Face and integrates with tools to facilitate user-friendly database querying interfaces.

Model Specs

Released2024-02-05
Parameters7B
Context32k
ArchitectureDecoder Only

Provider

Cloudflare Workers AI

Cloudflare

San Francisco, California, United States