A specialized local LLM for Svelte 5 and SvelteKit development, optimized for use as an IDE coding assistant (e.g., in Antigravity).
The model is engineered to avoid legacy Svelte 4 patterns.
$state(), $derived(), $effect()onclick={handler} (Standard HTML attributes)export let, $:, or on:clickDesigned to act as a pair programmer:
svelte-mcp tools for documentation lookup.The model is built using a Python script that assembles the Modelfile with the correct template and system prompts.
Generate Modelfile:
python3 build_modelfile.py
Create Ollama Model:
ollama create svelte5-coder -f Modelfile
ollama run svelte5-coder "create a counter component using runes"
build_modelfile.py: Script to generate the Modelfile. Contains the System Prompt, Few-Shot Examples, and Template configuration.Modelfile: The generated configuration file for Ollama.svelte-knowledge_base_small.txt: Compressed Svelte 5 documentation (optional/reference).svelte5-core.txt / sveltekit-core.txt: Raw documentation files.Syntax Enforcement Strategy: We found that injecting the entire Svelte documentation caused the 8B model to revert to legacy syntax due to the prevalence of older patterns in its pre-training or noise in the docs. Solution: We rely on a strong System Prompt with Few-Shot Examples to strictly enforce Svelte 5 patterns, while keeping the context window clean.