Mote-Code V1 1.7
a compact local model for web development
3 min readupdated
A compact 1.73B parameter language model (LLM) fine-tuned for everyday web development tasks, including writing endpoints, simple form pages, SQL queries, and layout design. Built on top of the LiquidAI/LFM3-1.7B base model, it was fine-tuned by author SyruneAi using LoRA (a fine-tuning method that adapts a model by training small auxiliary weight matrices). Unlike the non-instruction base model, which wastes tokens on reasoning and cuts off before outputting code, Mote-Code immediately generates ready-to-use snippets. The model runs easily and locally on an ordinary laptop without internet access, making it a handy lightweight offline assistant for developers.
Key features
- Runs on a laptop: The 1.73B size allows local generation without heavy server hardware.
- Solid web stack: Writes Python functions with type annotations, FastAPI and Flask endpoints, clean JavaScript without
var, HTML forms, and SQL schemas. - Honest benchmark with code execution: The author tested the model on 50 tasks (33 with actual execution in a subprocess) with a strict exclusion of test prompts from the training dataset.
- Built-in identity: The
chat_template.jinjatemplate assigns the model the name Mote by Syrune by default and teaches it to correctly refute false statements about its creators.
What you can do
- Draft a backend route: Generate a ready-to-use FastAPI or Flask endpoint with validation, pagination, and error handling for a local pet project.
- Build frontend and database components: Quickly output a semantic HTML page with responsive layout, JS logic for
fetchrequests, and SQL tables with indexes. - Integrate into an offline tool: Use it via the
transformerslibrary as a lightweight local snippet generator, adding a system prompt to lock in the response language.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("SyruneAi/mote-code-1.7b")
model = AutoModelForCausalLM.from_pretrained("SyruneAi/mote-code-1.7b")
messages = [{"role": "user", "content": "Write a FastAPI endpoint with pagination."}]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(prompt, return_tensors="pt"), max_new_tokens=512, do_sample=False)
Read more
DetailsBenchmark (executable tests): The overall score increased from 17/33 for the base LFM3-1.7B to 22/33; Python — 16/20 (previously 10/20), JS — 6/6, SQL — 4/4, FastAPI — 3/5.
Limitations: Console tasks did not improve (3/8), the model occasionally forgets to import modules, adds an extra
Trade-off: line to the end of code responses, and occasionally replies in Chinese to short English prompts (fixed with a system prompt).Training: A LoRA adapter (rank 32, alpha 64) on all 10 linear projections, 2 epochs on 3,499 examples (79% English, 50% code) on a single laptop.










Comments