WeSearch

Show HN: Local LLM code-generation with Gemma 4 e2B via JSON AST to Clojure

·2 min read · 0 reactions · 0 comments · 17 views
#programming#clojure#code-generation#json#swing
Show HN: Local LLM code-generation with Gemma 4 e2B via JSON AST to Clojure
⚡ TL;DR · AI summary

The article discusses a local code-generation harness designed to convert text specifications into Clojure programs using the Gemma 4 E2B model. It emphasizes the use of JSON AST fragments for generating code, which are validated and compiled into Clojure source. Additionally, the harness supports generating Java Swing applications and includes various validation and logging features.

Key facts
Original article
GitHub
Read full at GitHub →
Opening excerpt (first ~120 words) tap to expand

JSON AST Agent Harness This project is a local code-generation harness for turning text specs into Clojure programs. The validated local setup was tested with Gemma 4 E2B GGUF served by llama.cpp. Other models may work, but they are untested. The core idea is to stop asking a small local model to write full source code directly. Instead, the model emits constrained JSON AST fragments. The harness validates those fragments, assembles larger structures programmatically, lowers the accepted AST to Clojure, and records every generation/repair artifact in SQLite. What It Does Runs a local Gemma 4 E2B GGUF model through llama-server. Can target another OpenAI-compatible chat endpoint experimentally. Uses a planner pass to derive a sanitized contract from a text spec.

Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from GitHub