Instructions to use JackyJoh/Cecil-400M-SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use JackyJoh/Cecil-400M-SQL with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf JackyJoh/Cecil-400M-SQL:BF16 # Run inference directly in the terminal: llama cli -hf JackyJoh/Cecil-400M-SQL:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf JackyJoh/Cecil-400M-SQL:BF16 # Run inference directly in the terminal: llama cli -hf JackyJoh/Cecil-400M-SQL:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf JackyJoh/Cecil-400M-SQL:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf JackyJoh/Cecil-400M-SQL:BF16
Use Docker
docker model run hf.co/JackyJoh/Cecil-400M-SQL:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use JackyJoh/Cecil-400M-SQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JackyJoh/Cecil-400M-SQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JackyJoh/Cecil-400M-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JackyJoh/Cecil-400M-SQL:BF16
- Ollama
How to use JackyJoh/Cecil-400M-SQL with Ollama:
ollama run hf.co/JackyJoh/Cecil-400M-SQL:BF16
- Unsloth Desktop
- Docker Model Runner
How to use JackyJoh/Cecil-400M-SQL with Docker Model Runner:
docker model run hf.co/JackyJoh/Cecil-400M-SQL:BF16
- Lemonade
How to use JackyJoh/Cecil-400M-SQL with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull JackyJoh/Cecil-400M-SQL:BF16
Run and chat with the model
lemonade run user.Cecil-400M-SQL-BF16
List all available models
lemonade list
- Atomic Chat
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf JackyJoh/Cecil-400M-SQL:BF16# Run inference directly in the terminal:
llama cli -hf JackyJoh/Cecil-400M-SQL:BF16Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf JackyJoh/Cecil-400M-SQL:BF16# Run inference directly in the terminal:
./build/bin/llama cli -hf JackyJoh/Cecil-400M-SQL:BF16Use Docker
docker model run hf.co/JackyJoh/Cecil-400M-SQL:BF16Cecil-400M-SQL
A 401M parameter model for Postgres and SQLite SQL: autocomplete inside a query, filling a gap in the middle of a query, and English to SQL. It is the model behind the text2sql tool and is meant to be downloaded and run locally by that tool.
Cecil-400M was pre-trained from scratch on about 60B quality-filtered Common Crawl tokens as part of undergraduate research on MinHash dedup thresholds. The name is a nod to Common Crawl (CC). Cecil-400M-SQL is that model fully fine-tuned on about 600,000 SQL examples built from public text-to-SQL datasets and synthetic pairs on app-style schemas. For a stronger model, see Qwen2.5-Coder-3B-SQL.
Files
| File | Precision | Size |
|---|---|---|
Cecil-400M-SQL-BF16.gguf |
BF16 | 0.8 GB |
Runs in llama.cpp and anything built on it. To make a smaller file, use llama-quantize.
Model details
- Architecture: Llama-style decoder, 36 layers, hidden size 960, 15 attention heads (5 KV heads)
- Context length: 2,048 tokens
- Tokenizer: SmolLM tokenizer (49,152 tokens)
Prompt format
Every task is written as a small repo with a gap to fill in the last file: the schema first, then the current query file with the gap. Since the tokenizer has no FIM tokens, existing tokens stand in for them: <repo_name>, <file_sep>, <issue_start> (prefix), <issue_comment> (suffix) and <issue_closed> (where the answer starts).
<repo_name>my_db
<file_sep>schema.sql
-- dialect: postgres
CREATE TABLE users (id int, name text, age int);
<file_sep>query.sql
<issue_start>-- users over 30
SELECT name FROM users <issue_comment><issue_closed>
The text2sql tool builds these prompts for you.
Evaluation
BIRD Mini-Dev (SQLite), scored by running the generated SQL and comparing its results to the reference query. Prompts longer than the 2,048 token context count as misses.
| Task | Score |
|---|---|
| Continue a query | 28.7% |
| Continue a query, with an intent comment | 41.7% |
| Fill the middle of a query | 8.6% |
| Fill the middle, with an intent comment | 17.9% |
| English to SQL (no hints) | 5.2% |
Limitations
This is a small model with a short context. Large schemas will not fit, and English to SQL is weak. It works best for short completions when the query has a comment saying what it is for.
- Downloads last month
- -
16-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf JackyJoh/Cecil-400M-SQL:BF16# Run inference directly in the terminal: llama cli -hf JackyJoh/Cecil-400M-SQL:BF16