How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="vinod-halaharvi/ascii-to-go-coder",
	filename="ascii-to-go-coder-Q4_K_M.gguf",
)
llm.create_chat_completion(
	messages = [
		{
			"role": "user",
			"content": "What is the capital of France?"
		}
	]
)

ASCII-to-Go Coder

A fine-tuned model that generates working Go code from ASCII architecture diagrams.

What it does

Give it an ASCII box diagram describing a system architecture, and it generates complete, compilable Go code implementing that system.

Input:

[Producer] --> [Channel] --> [Worker 1]
                         --> [Worker 2]
                         --> [Worker 3]
                              |
                         [Results Channel]
                              |
                         [Collector]

Output: A complete Go program with goroutines, channels, WaitGroups, and proper shutdown handling.

Training

  • Base model: Qwen2.5-Coder-7B-Instruct
  • Method: LoRA (r=16, 0.53% of parameters trainable)
  • Dataset: 76 hand-written ASCII diagram โ†’ Go code pairs
  • Training time: ~13 minutes on NVIDIA L4 (24GB)
  • Final loss: 0.011
  • Token accuracy: 99.8%

Patterns covered

The training data covers real-world Go patterns including: HTTP servers, middleware chains, worker pools, pub/sub, WebSocket chat, reverse proxies, JWT authentication, circuit breakers, LRU caches, ring buffers, tries, priority queues, state machines, event sourcing, SSE streaming, gzip compression, generics, channel pipelines, graceful shutdown, rate limiting, fan-in/fan-out, and more.

How to run

With llama.cpp:

llama-server \
    -hf vinod-halaharvi/ascii-to-go-coder \
    -ngl 999 --host 0.0.0.0 --port 8080 --ctx-size 4096

Then open http://localhost:8080 and paste an ASCII diagram.

Limitations

  • Trained on only 76 examples โ€” may struggle with patterns not in the training set
  • Generated code compiles but may contain logical bugs in complex scenarios
  • Works best with standard library patterns; less reliable with third-party libraries
  • This is a learning project, not production-grade

Hardware requirements

  • Minimum: 6GB VRAM (Q4_K_M quantization)
  • Recommended: NVIDIA GPU with 8GB+ VRAM
  • Also runs on: CPU (slower), Apple Silicon (via Metal)
Downloads last month
6
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for vinod-halaharvi/ascii-to-go-coder

Base model

Qwen/Qwen2.5-7B
Adapter
(718)
this model