Tvashtr
In the Rig Veda, Tvashtr is the divine artisan who forged Indra's vajra and sharpened the tools of the
gods. This project does the same for open models: it makes the model you already have sharper
without retraining it.
Documentation with architecture diagrams: https://dmdhrumilmistry.github.io/tvashtr
Tvashtr makes a local Ollama coding model measurably better without fine-tuning. Nothing is
trained, and none of your code is used as data. It ships as:
- a Python package and CLI (
python -m tvashtr ...),
- an Ollama-compatible endpoint, so Continue, Aider, Open WebUI or any Ollama/OpenAI client gets the
enhanced model by picking a
tvashtr/<model> name,
- a Claude Code plugin (skill + slash commands).
It improves models in two ways and measures both on held-out problems against an unmodified control:
- Post-training enhancements (PTEs): extra inference-time compute around the same weights
(parallel sampling, execution-feedback repair, test synthesis, selection by execution).
- Training-free weight updates: ExPO extrapolation and task-vector arithmetic over checkpoints that
already exist, producing a new GGUF.
Results at a glance

| Model | Method | Held-out pass@1 | Change | Cost |
|---|
| Qwen2.5-Coder-1.5B-Instruct | S* (test-time search) | 80.5% (66/82) vs 70.7% | +8 problems, +9.8 pts | 8.5 calls, 24x tokens, ~36 s/problem |
| qwen3-coder:30b | adaptive | 93.9% (77/82) vs 92.7% | +1 problem (noise) | 3.4 calls, 6.5x tokens |
| Qwen2.5-Coder-7B-Instruct | ExPO weight update | 84.2% (69/82), original kept | 0 (no alpha beat the original) | none at run time |
| Qwen2.5-Coder-1.5B-Instruct | ExPO weight update | original kept | within noise | none at run time |
| Qwen2.5-Coder-0.5B-Instruct | ExPO weight update | original kept | hurts (-10 at alpha 0.1) | none at run time |
In short:
- Small models gain a lot from test-time search. S* lifts the 1.5B model by about 10 points on
problems it was never tuned on, enough to land close to the unmodified 7B (84.2%).
- Strong models barely gain. This matches recent work showing that self-repair barely moves
Qwen3-Coder (doi 10.3390/ai7090353).
- ExPO did not help any Qwen2.5-Coder size, and it can destroy small models.
- Merging a security fine-tune into a coder did not give one model that is good at both.
Grafting DeepHat-V1-7B onto Qwen2.5-Coder-7B-Instruct cost coding and kept none of DeepHat's
CWE-mapping gain. For cyber + coding, route:
qwen3-coder:30b for code, gpt-oss:20b for security
(details).
Benchmark: HumanEval, 164 problems, split deterministically into a dev half (82, used to pick
strategies and alphas) and a test half (82, used only to report). Scoring uses the official hidden
tests. Hardware: i9-14900K, 32 GB RAM, RTX 3060 12 GB.
Noise floor: the same fp16 weights, registered twice and run at temperature 0, scored 44 vs 45,
41 vs 38 and 58 vs 60. GPU kernels are not bit-for-bit deterministic, so treat differences of 3
problems or fewer (about 3.5 points) as noise.
Detailed results
Inference-time enhancements on Qwen2.5-Coder-1.5B


| Strategy | Dev pass@1 | Test pass@1 | Model calls / problem | Output tokens / problem | Seconds / problem |
|---|
single answer (direct) | 72.0% (59) | 70.7% (58) | 1.0 | 114 | 7 |
plan-first (plan) | 61.0% (50) | | 2.0 | 550 | 6 |
self-debug (self_debug) | 73.2% (60) | | 2.0 | 434 | 6 |
adaptive (adaptive) | 80.5% (66) | | 5.8 | 1625 | 20 |
CodeT (codet) | 81.7% (67) | | 6.0 | 778 | 11 |
S* (s_star) | 85.4% (70) | 80.5% (66) | 8.3 | 2536 | 30 |
What changed on the held-out half, S* vs single answer
(full list: results/compare__...s_star__test.md):
- Improved 12, regressed 4.
- Crashes eliminated. All 4 runtime errors (IndexError, ValueError, UnboundLocalError) are gone,
because execution feedback catches them.
- Wrong answers drop from 20 to 15. The regressions are all wrong answers. Selection by execution
agreement sometimes picks a plausible but wrong majority.
Observations:
- Plan-first hurts small models (-9). A 1.5B model's written plan is often wrong, and it then
follows its own wrong plan faithfully.
- Self-debug alone barely helps (+1). Repairing one sample has nothing to choose between.
- Diversity plus execution is what pays off. CodeT (+8) and S* (+11) sample several candidates
and let execution choose.
- CodeT is the cost-efficient pick. It gets most of S*'s gain at about a third of the tokens.