ECHOFORGE RESEARCH · OPEN WEIGHTS

Aiken Coder v1

A 7B model for writing Aiken, the smart-contract language of Cardano.

It is Qwen2.5-Coder-7B-Instruct fine-tuned with QLoRA on 10,319 Aiken questions and answers. This is a research release from a student project: the model, its training numbers and its exam results are published together, including what didn't work.

9 / 30
Aiken exam, compiler-graded
0.584
Test loss (v0: 1.155)
4.68 GB
GGUF Q4_K_M
Apache-2.0
License

01

Model

Method
QLoRA (NF4), rank 16, alpha 32, all attention and MLP projections, loss on answers only, 1 epoch
Data
AmiBening/cardano-aiken-stdlib-v2-1 (MIT), 10,319 training examples
Target
Aiken v1.1, standard library v2.2.1
Files
Aiken-Coder-7B-v1-Q4_K_M.gguf (4.68 GB) · Modelfile (Ollama) · adapter/ (LoRA, PEFT) · loss_curve.png
Status
Research release. Don't deploy what it writes to contracts that hold real funds without a review and an audit.
Author
Charles Tao · stickmancharles.com

02

Results on the Aiken exam

The Aiken exam is 30 programming tasks with hidden tests, graded by the real compiler (Aiken v1.1.24, stdlib v2.2.1). Level 1 is plain functions, level 2 simple validators, level 3 validators that check several things at once (signatures, time, tokens, outputs). An answer passes only if it compiles and passes every hidden test for its task. The tasks are kept private, so that future models can't train on the answers.

ModelPasses (of 30)
Claude Sonnet 5.5
agent, Medium
30
10 / 10 / 10
Gemini 4 Hy
agent, Medium
30
10 / 10 / 10
Gemini 3.8 Flash
agent, Medium
19
10 / 5 / 4
Claude Haiku 5.5
agent, Medium
15
10 / 4 / 1
GPT-5.6 Terra
agent, Medium
12
7 / 4 / 1
Aiken-Coder 7B v1 (this model)
single prompt
9
8 / 1 / 0
GPT-5.6 luna
agent, Medium
8
6 / 2 / 0
DeepSeek v4.1 Flash, high
agent
8
8 / 0 / 0
DeepSeek v4.1 Flash, low
agent
8
8 / 0 / 0
single prompt
4
4 / 0 / 0
single prompt
2 / 0
as trained / as published
gpt-oss-120B
agent, Medium
0
0 / 0 / 0
Qwen2.5-Coder-7B-Instruct, Qwen3-8B, Qwen3.5-9B (not fine-tuned)
single prompt
0
0 / 0 / 0

Graded 2026-11-30. Agent: the outside models ran in Google Antigravity, closed book (terminal and browser turned off), and wrote all 30 answers in one session each; Medium is Antigravity's setting, low and high DeepSeek's. Single prompt: Aiken-Coder and the Qwen models answered each prompt on its own, in Colab, with greedy decoding.

03

How to read this table

This is a snapshot of one narrow skill, not a ranking of the models. I publish it to show where Aiken is hard for language models, not to compare them in general.

  • 01Closed book. No model could run the compiler, read documentation or try again. A developer using any of these models would see the compiler's error and fix it in seconds.
  • 02One import decides much of the middle. In stdlib v2, VerificationKeyHash and ScriptHash are defined in aiken/crypto. Several models imported them from cardano/address, or from a cardano/crypto module that doesn't exist. That one line stops the whole module from compiling, however correct the validator below it is. As a diagnostic only (the table keeps the graded scores), I moved just that import to aiken/crypto and graded again. Gemini 3.8 Flash went from 19 to 29, Claude Haiku 5.5 from 15 to 24, GPT-5.6 Terra from 12 to 22, and GPT-5.6 luna from 8 to 10. DeepSeek v4.1 Flash wrote the module paths of stdlib v1 (aiken/transaction), which stdlib v2 renamed; in the answers I read closely, its validator logic was right.
  • 03So the scores measure how current a model's knowledge of Aiken's standard library is, as much as how well it reasons. Every prompt names Aiken v1.1 and stdlib v2.2.1, so the test is fair, but it is narrow. Aiken's standard library moved many of its modules in v2, and much of the Aiken code online was written before that.
  • 04Small and noisy. 30 tasks, one run each: a difference of one or two tasks is noise. Aiken-Coder v1's 9 is a tie with the models at 8, not a win over them.
  • 05Passing isn't proof of safety. The hidden tests check the behavior each task describes, with hand-built transactions. They don't look for every attack.

04

What v1 shows

  • 01Every answer of v1's that compiled also passed its tests. All 21 misses failed at the compiler or had no code, mostly in validators. Its training data has 748 answers with a complete validator, and only 68 of them compile under Aiken v1.1.24: the model learned the dataset's mistakes along with its Aiken.
  • 02Only 32% of the dataset's code answers compile. Training only on the ones that do (v1-clean) did worse, 4 of 30, because it removed two thirds of the Aiken the model saw. The next version will add code that compiles instead of removing code that doesn't.
  • 03Better than v0 by every measure. Test loss on about 100 held-out questions: 0.584, against 1.155 for v0 as trained and 1.579 for v0 as published. v0's export to MLX rounded its weights to 4 bits twice and kept only about 30% of what training had gained.
  • 04The 4-bit file loses nothing measurable. Q4_K_M has perplexity 2.279, Q8_0 2.283. It was merged at 16-bit precision and rounded once.

05

Use it

Tell it the versions, as the exam's prompts do: "Use Aiken v1.1 and the Aiken standard library v2.2.1." Low temperature (0.2, as in the Modelfile) or greedy decoding works best.

Ollama

ollama run hf.co/StickmanCharles/Aiken-Coder-7B-v1:Q4_K_M

Or download the GGUF file and the Modelfile into one folder, then ollama create aiken-coder-v1 -f Modelfile.

LM Studio

Search for StickmanCharles/Aiken-Coder-7B-v1, or import the downloaded .gguf. The chat template is inside the file.

llama.cpp

llama-cli -hf StickmanCharles/Aiken-Coder-7B-v1:Q4_K_M

Transformers + PEFTthe LoRA adapter on the original 16-bit model

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = "Qwen/Qwen2.5-Coder-7B-Instruct"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, "StickmanCharles/Aiken-Coder-7B-v1", subfolder="adapter")

prompt = ("Write an Aiken function `reverse(xs: List<Int>) -> List<Int>` without using list.reverse. "
          "Use Aiken v1.1 and the Aiken standard library v2.2.1.")
inputs = tok.apply_chat_template([{"role": "user", "content": prompt}], add_generation_prompt=True,
                                 return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**inputs, max_new_tokens=640, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Check everything it writes with aiken check.

06

Training

Hardware
one NVIDIA L4 (Google Colab), 55 minutes of training
Steps
645 steps × 16 examples, one pass over 10,319 examples
Learning rate
2e-4, warmup then cosine
Length
examples up to 1,024 tokens (about 99% of the data)
Split
by question: 200 for validation, about 100 for test
Validation loss
1.603 at the start → 0.562 at the end (loss_curve.png)
Test loss
0.584, answer tokens only

07

Versions

08

Credits and license

Cite

@misc{tao2026aikencoder,
  title  = {Aiken-Coder 7B v1},
  author = {Tao, Charles},
  year   = {2026},
  url    = {https://huggingface.co/StickmanCharles/Aiken-Coder-7B-v1}
}

This page follows the model card on Hugging Face. Where the two differ, the card is right. huggingface.co/StickmanCharles/Aiken-Coder-7B-v1