Last refreshed 2026-05-19. Next refresh: weekly.
Why use SQLCoder 7B 2 on Cloudflare Workers AI?
Cloudflare Workers AI offers SQLCoder 7B 2 with competitive pricing. Cloudflare is a leading connectivity cloud company that provides a comprehensive suite of cloud-native products and developer tools to enhance web performance, security, and reliability.
Setup recipe
Docs fallbackUse the provider REST API or SDKCreate a provider API keymodel: @cf/defog/sqlcoder-7b-2@cf/defog/sqlcoder-7b-2Request example
@cf/defog/sqlcoder-7b-2.Gotchas
- Use provider model ID "@cf/defog/sqlcoder-7b-2", not the LLMReference slug "sqlcoder-7b-2".
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. However, it is primarily a translator and requires schema descriptions for effective query generation, with some limitations such as database system specificity and not functioning as an analyst.
FAQ
What is the context window for SQLCoder 7B 2 on Cloudflare Workers AI?
SQLCoder 7B 2 supports a 32k token context window on Cloudflare Workers AI.
What API model ID do I use for SQLCoder 7B 2 on Cloudflare Workers AI?
Use the model ID @cf/defog/sqlcoder-7b-2 when calling Cloudflare Workers AI's API.
Who created SQLCoder 7B 2?
SQLCoder 7B 2 was created by Defog.ai as part of the SQLCoder model family.
Is SQLCoder 7B 2 open source?
SQLCoder 7B 2 has open weights under CC-BY-SA-4.0 according to the seed data, but that does not necessarily mean an OSI-approved open-source license.