--- language: [en] license: apache-2.0 base_model: unsloth/Qwen2.5-Coder-3B-Instruct library_name: peft pipeline_tag: text-generation tags: [synoema, tool-use, agentic, function-calling, lora, qlora, code, qwen2.5, gguf] model-index: - name: synoema-coder-3b-tools-v8 results: - task: {type: tool-use, name: Synoema MCP Agentic Tool-Use Eval (28 tasks)} metrics: - {type: pass@1, value: 1.0, name: "28-task agentic eval (28/28)"} --- # Synoema-Coder-3B Tools (C8) A **3B** LoRA fine-tune of `unsloth/Qwen2.5-Coder-3B-Instruct` that turns it into an **agentic coding model for the [Synoema](https://synoema.tech) programming language** — it writes Synoema, type-checks it, runs it, searches a corpus, and self-corrects on errors, all through MCP tools. - 🌐 **Website:** https://synoema.tech - 🤖 **This model:** https://huggingface.co/delimitter/synoema-coder-3b-tools-v8 - 📚 **Training corpus (dataset):** https://huggingface.co/datasets/delimitter/synoema-coder-3b-tools-corpus --- ## 🏆 Result: **100% (28/28)** on the Synoema agentic tool-use benchmark Scored on the **corrected agentic harness**: the model is driven **turn-by-turn** (generation stops at `<|im_end|>`), and **real** tool results are injected between turns — actual `sno check` / `sno run` output from the live Synoema compiler, never mocked. A task only passes if the model genuinely completes it end-to-end (e.g. multi-write self-correction: write broken code → observe the type error → rewrite a valid fix → type-check passes). | Capability | Tasks | Pass | |---|---|---| | Write + typecheck + run | TU1–TU3, TU5, TU10 | ✅ | | Search → write → run | TU6, TU9, TU20 | ✅ | | Multi-write self-correction (if/else → ternary) | TU4, TU13 | ✅ | | Language features (ADT, HOF, pattern match, cons) | TU11, TU14–TU19, TU23, TU29 | ✅ | | List comprehensions | TU12, TU26 | ✅ | | Nested ternary (fizzbuzz) | TU22, TU30 | ✅ | | **Total** | **28** | **28/28** | --- ## What is Synoema? [Synoema](https://synoema.tech) is an **LLM-native programming language and runtime** designed so that models can write it reliably: - **BPE-aligned operators** — every operator maps to exactly one `cl100k_base` token. - **Ternary instead of if/else** — `? cond -> a : b` (nestable). - **GBNF grammar** for constrained decoding (structural-correctness guarantee). - **Cranelift JIT + WebAssembly** compile targets. - **MCP server** exposing `file_write`, `file_read`, `sno_typecheck`, `sno_run`, `search_corpus`. - **Contract annotations** (`requires` / `ensures`) for formal verification. --- ## Model details | Property | Value | |---|---| | Base model | `unsloth/Qwen2.5-Coder-3B-Instruct` | | Parameters | 3B | | Method | QLoRA (4-bit NF4 + LoRA), merged to fp16 for GGUF | | LoRA | r=16, alpha=32 | | Sequence length | 1024 | | Epochs / cycle | 3 | | Training corpus | ~18k tool-use + codegen examples — **every example passes `sno check` + `sno run`** | | Cycle | C8 (sequential "carousel": each cycle warm-starts from the best previous adapter, then trains on the corpus plus targeted examples for the prior cycle's failures) | | Hardware | AMD RX 7900 GRE 16GB (ROCm + unsloth) | --- ## GGUF files (llama.cpp / Ollama / LM Studio) | File | Quant | Size | Notes | |---|---|---|---| | `synoema-coder-3b-tools-v8.Q4_K_M.gguf` | Q4_K_M | 2 GB | smallest, recommended for local use | | `synoema-coder-3b-tools-v8.Q8_0.gguf` | Q8_0 | 3 GB | near-lossless | | `synoema-coder-3b-tools-v8.f16.gguf` | F16 | 6 GB | full precision | ```bash # llama.cpp llama-cli -hf delimitter/synoema-coder-3b-tools-v8 --hf-file synoema-coder-3b-tools-v8.Q4_K_M.gguf -p "Write quicksort in Synoema to src/qs.sno and run it." # Ollama ollama run hf.co/delimitter/synoema-coder-3b-tools-v8:Q4_K_M ``` --- ## Usage — Transformers + PEFT (adapter) ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-Coder-3B-Instruct", device_map="auto") tok = AutoTokenizer.from_pretrained("unsloth/Qwen2.5-Coder-3B-Instruct") model = PeftModel.from_pretrained(base, "delimitter/synoema-coder-3b-tools-v8") ``` Prompt format is **ChatML**. The system prompt used at training/eval: ``` <|im_start|>system You are sno-code, a Synoema coding agent. Use tools to write and verify code.<|im_end|> <|im_start|>user Write `square x = x * x` with `main = square 9` to src/square.sno, typecheck and run it.<|im_end|> <|im_start|>assistant ``` The model emits OpenAI-style `tool_calls` for `file_write`, `sno_typecheck`, `sno_run`, `file_read`, `search_corpus`; feed real tool results back as `tool` turns. --- ## Synoema language quick reference ```synoema maxOf x y = ? x > y -> x : y -- ternary (NO if/then/else) fact 0 = 1 -- pattern matching fact n = n * fact (n - 1) evens xs = [x | x <- xs, x % 2 == 0] -- list comprehension sumList xs = foldl (\acc x -> acc + x) 0 xs -- higher-order functions Direction = North | South | East | West -- ADT opposite North = South main = qsort [3 1 4 1 5] -- lists are SPACE-separated ``` --- ## License Apache-2.0 (same as the Qwen2.5 base model). **Synoema** © Andrey Bubnov — https://synoema.tech