JEA-RX Gemma 4 E4B Text2SQL — SOTA
Best available checkpoint for JEA-RX text-to-SQL generation. Trained April 2026.
Base: google/gemma-4-E4B-it + LoRA adapters
Training data: 38,887 exec-verified SQL pairs from GetGenetica/jearx-text2sql-training-data
Post-training: 200 GRPO RL steps with composite neurosymbolic reward
This model is the base checkpoint for the JEA-RX v3.0 ablation study (GetGenetica/jearx-ablation-v3-*).
Honest benchmarks
| Benchmark | Metric | Score | Notes |
|---|---|---|---|
| BIRD holdout (50 rows) | exec_acc (real SQLite) | 0.610 | Gemma 3 4B baseline — this model expected to exceed |
| BIRD holdout (50 rows) | exec_acc (real SQLite) | TBD | Run ablation_full to measure |
| Spider 1034 | exec_acc | TBD | Pending evaluation run |
Note: exec_acc reported here uses real SQLite execution. Prefix-validity scores (which give 1.0) are NOT reported.
Architecture
| Property | Value |
|---|---|
| Base | Gemma 4 E4B Instruct (3.77B params) |
| LoRA rank | r=8, α=32 |
| LoRA targets | q_proj, k_proj, v_proj, o_proj |
| Training examples | 38,887 (exec_acc=1.0 only, curated) |
| Data mix | 60% curated_clean + 30% BIRD + 10% Tray golden |
| GRPO RL steps | 200 post-SFT |
| GRPO reward | 0.4×graph + 0.4×cispo + 0.2×format (v2.9 weights) |
| Platform | JEA-RX neurosymbolic routing (Tsetlin + Clifford Algebra) |
v3.0 Upgrade path
This model feeds into the SOTA v3.0 training which adds:
| Component | Role | Weight |
|---|---|---|
| NCD schema grounding | Identifier-level overlap (schema idents ∩ SQL idents) | 0.25 |
| ChromatinHDC curriculum | 1024-dim bipolar HDC novelty upsampling (2× for novel > 0.3) | data |
| B-spline mini-KAN | 5→3→1 interpretable reward network, frozen after 50 steps | 0.08 |
| Hallucination kill-switch | ncd_schema < 0.05 AND exec_sim < 0.05 → reward = 0.0 | — |
See GetGenetica/jearx-ablation-v3-full for the component ablation study.
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained(
"google/gemma-4-E4B-it", torch_dtype=torch.bfloat16, device_map="auto"
)
tok = AutoTokenizer.from_pretrained("google/gemma-4-E4B-it")
model = PeftModel.from_pretrained(base, "GetGenetica/jearx-gemma4-e4b-text2sql-sota")
model.eval()
prompt = "[dialect:sqlite] [question] Show total revenue by location for the last 7 days [/question]\n\n### SQL:\n"
inputs = tok(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=150, do_sample=False)
sql = tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(sql)
Prompt format
[dialect:sqlite] [schema] CREATE TABLE orders (id INT, amount FLOAT, location TEXT, date DATE);
[question] Show total revenue by location for the last 7 days [/question]
### SQL:
Supported dialect tags: [dialect:sqlite], [dialect:snowflake], [dialect:postgresql], [dialect:cypher]
Training data
From GetGenetica/jearx-text2sql-training-data:
| File | Rows | Source |
|---|---|---|
| curated_sql_clean_v1.jsonl | 38,887 | 17 sources, 97.2% exec_verified, 49% paraphrases |
| bird_training_bundle_v2.jsonl | 8,505 | BIRD-SQL training set |
| tray_golden_v3.jsonl | 97 | Tray POS domain golden pairs |
FORGE integration
This model is served via FORGE (/sql endpoint) with Kolmogorov complexity scoring and Tsetlin Machine routing:
curl http://localhost:3030/sql \
-H "Content-Type: application/json" \
-d '{"question": "Show daily revenue", "dialect": "sqlite"}'
Response includes sql, verdict (PASS/FAIL/UNAVAILABLE), reward (0–1), and routed_by.
Platform
JEA-RX (Joint Embedding Addressable — Relational eXpert) platform components:
- FORGE: Rust/WASM agent orchestration runtime with Tsetlin + Clifford routing
- MCP server:
serving/forge_mcp_server.py— exposes 10+ tools to any MCP client - Mechanistic interpretability: 6-layer pipeline trace (L0–L5) in FORGE UI
- NIST AI RMF 1.0: compliance endpoints at
/api/stateless/nist-status
Ablation study
Run hf_jearx_sota_v3_ablation.py with ABLATION_MODE to compare components:
| Mode | Description | Expected result |
|---|---|---|
full |
All v3 components (control) | Highest mean reward |
no_ncd |
No schema grounding | Hallucination rate increases |
no_hdc |
No novelty curriculum | Fewer rare SQL patterns learned |
no_kan |
No B-spline KAN reward | Slight reward reduction |
v2_compat |
v2.9 reward structure (baseline) | Lower mean reward |
- Downloads last month
- 55
Model tree for GetGenetica/jearx-gemma4-e4b-text2sql-sota
Base model
google/gemma-4-E4B-it