coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2 (GGUF, Q4_K_M)
This is AJ-Gonzalez/coder-lfm3-1.7b-k3.1-pro-heretic
with two training-free weight edits. It is a single Q4_K_M GGUF for llama.cpp and LM Studio.
With thinking on, the parent model rarely closes its <think> block, so it often never gives an answer:
- At an 8k token budget, the bf16 model answered 0 of 30 everyday coding prompts.
- At a 32k budget, 61 of 100 prompts ended in a repetition loop.
The edits change two things:
- Finish thinking. The model closes
</think>and answers. - Keep second-guessing out of the answer. On its own, the first edit (v1, not published here) often moved the deliberation into the final answer ("Wait—this isn't quite right… let me give a clean version"). The second edit removes that.
No gradients, no training data and no fine-tuning were used. Each edit is a rank-one update to the MLP output projections of five layers. Its direction is read off the original model's own activations ("weight-space programming").
Attribution
| Base model | LiquidAI/LFM3-1.7B, Liquid AI |
| Coder distill | AJ-Gonzalez/coder-lfm3-1.7b-k3.1-pro, a LoRA distill on a Kimi k3.1-pro coder corpus. Its training-data terms are described on its model card. |
| Refusal removal | AJ-Gonzalez/coder-lfm3-1.7b-k3.1-pro-heretic, made with Heretic 2.0.0. This model's direct parent. |
| Editing method | Weight-space programming, following Bennington, Kaelar, Lee, Edwards, Glick and Danks, Gradient-Free Weight Editing Reduces Overthinking in Qwen3.8-27B: a norm-matched controlled replication of weight-space programming, Concept Country working paper v1 (2026). Code: conceptcountry/weight-space-programming. |
| Conversion | llama.cpp convert_hf_to_gguf.py and llama-quantize |
All credit for the model's knowledge and coding ability belongs to Liquid AI and to the authors of the coder distill and the Heretic release. This release only changes when the model stops thinking and how it writes its answer.
License
The LFM Open License v1.0, inherited from LFM3-1.7B through the parent. A copy is included as LICENSE.
- Commercial use is licensed only for entities below the license's threshold of USD 10M annual revenue (section 5).
- Modification notice (section 4b): this file is a modified version of the parent's weights.
- The
ffn_downweight (model.layers.N.feed_forward.w2) was edited in blocks 6, 8, 10, 12, 14, 15, 17, 19, 21 and 23. - The GGUF fields
general.nameandgeneral.descriptionwere changed. - Every other tensor, the tokenizer, the chat template and the embedded sampling defaults are the parent's, converted and quantised with llama.cpp.
- The
- No warranty. The parent is abliterated, so it will comply with requests that the original LFM3 model declines. Nothing here restores refusals; use it at your own risk.
Files
| File | Contents |
|---|---|
coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2-Q4_K_M.gguf | The model, 1.1 GB. SHA-256 b5fd7398e8964459b901a570c8409d0a212980f341bd49802a8de21a54a86d81 (also in SHA256SUMS). |
wsp/edit_1_finish_thinking.json | Full specification of edit 1, with per-layer norms, relative change, realised precision and direction hashes. |
wsp/edit_2_no_second_guessing.json | The same for edit 2. |
wsp/leak.py | The counter used for "second-guessing leaked into the answer". |
LICENSE | LFM Open License v1.0 |
Only Q4_K_M is provided because it is the only format of v2 that was evaluated. The quantisation matters: Q4_K_M makes the finish-thinking edit act more strongly than it does at 16-bit, and the strengths below were chosen at Q4_K_M. Other quantisations of the same edit have not been tested.
Usage
LM Studio. Search for coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2 in Discover.
- Set the context length to 32768.
- Leave the sampler at the file's defaults and leave thinking on.
Tested with LM Studio's llama.cpp CUDA 12 runtime 2.73.0.
llama.cpp (evaluated with build 11969):
hf download notfakerv/coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2-GGUF \
coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2-Q4_K_M.gguf --local-dir .
llama-server -m coder-lfm3-1.7b-k3.1-pro-heretic-wsp-v2-Q4_K_M.gguf -c 32768 -ngl 99 \
--temp 0.1 --top-k 50 --top-p 0.95 --min-p 0.05 \
--repeat-penalty 1.1 --repeat-last-n 64 --reasoning-format deepseek
These are the exact sampling settings of every evaluation below: LM Studio's defaults with the GGUF's embedded values.
- Use a 32k context. At 8k, v1 still ran out of room on about a quarter of HumanEval+ problems before answering.
- Median thinking is about 0.5k tokens on everyday prompts and 2.8k on MBPP problems.
What was changed
| Edit 1: finish thinking | Edit 2: no second-guessing | |
|---|---|---|
| Direction | cc: mean residual state over the last 48 thinking tokens before </think>, minus the rest of the thinking | vo: state just before a verification phrase ("wait,", "let me double-check", …), minus the rest, with the generic sentence-start component projected out |
| Sign and strength | +0.10 (push towards concluding) | −0.20 (push away from second-guessing) |
| Matrices | ffn_down of blocks 6, 8, 10, 12, 14 | ffn_down of blocks 15, 17, 19, 21, 23 |
| Mean relative change per matrix | 0.44% (0.32–0.56%) | 0.60% (0.51–0.77%) |
| Split-half replication | cosine 0.87–0.92 | cosine 0.81–0.84 |
| Signal-to-noise | 0.18–0.20 | 0.33–0.38 |
Where the directions come from. Both are differences of mean activations, measured on 33 finished thinking traces of the original model on MBPP-train problems.
- Replication. Each direction was fitted separately on two halves of the problems. The table's split-half cosine compares the two fits. A placebo contrast fitted the same way at random positions gives a split-half cosine of −0.07 to +0.07 and a signal-to-noise of about 0.02.
- Independence. The two directions are nearly orthogonal (|cos| ≤ 0.15).
How the edits were applied. The edit is solved through LFM3's post-FFN norm and written into the 16-bit checkpoint, and the result is quantised to Q4_K_M. It survives storage precision with a realised cosine ≥ 0.998. Edit 2 was applied on top of edit 1, using directions measured on the unedited model.
Evaluation
Screening (selection data, Q4_K_M, 32k context)
The screening data was 100 MBPP validation/prompt problems and 30 open-ended coding prompts, one sample each, with the sampler above. These numbers chose v2. They are not a held-out confirmation.
| Build | Second-guessing in the answer | Repetition loops (of 130) | Open-ended prompts answered | MBPP pass@1 | Median thinking tokens (prompts / MBPP) |
|---|---|---|---|---|---|
| v1: edit 1 only at strength 0.15, Q4_K_M | 26 of 128 answers (20%) | 7 | 30/30 | 44/100 | 561 / 3022 |
| v1, Q8_0 | 14 of 130 (11%) | 8 | 30/30 | 47/100 | 868 / 2604 |
| v2 (this file) | 5 of 129 (3.9%) | 5 | 30/30 | 50/100 | 515 / 2794 |
How the columns are counted:
- Second-guessing in the answer. The answer prose, with code blocks removed, contains a self-correction or thinking-voice phrase ("Wait—", "Actually,", "let me rewrite", "The user wants", …), counted by
wsp/leak.py. The original model's own finished answers do this about 3% of the time. - Loop. A 30-word span repeats four or more times.
The selection rule, written down before the results:
- Eligible: second-guessing ≤ 5% of answers, ≥ 27/30 open-ended prompts answered, ≤ 5 loops.
- Among eligible builds, the highest MBPP pass wins.
What else was tried and rejected:
- Lower doses of edit 1 alone reduced the leak but looped more. Dose alone could not meet the rule.
- Edit 2 at −0.10 did not stop the leak (7–15%).
- Edit 2 without edit 1 did not make the model conclude (19–20 of 30 prompts answered).
- Weaker finish-thinking pushes, tried in order to think longer, did think longer (median 1.0–1.3k tokens on the prompts). On the same problems they solved no more and they looped more.
Held-out results available so far (from v1, not v2)
The finish-thinking edit alone (v1, strength 0.15, evaluated at 16-bit) passed a pre-registered, held-out confirmation. The comparison was against the original model and against a random-direction edit of identical size on the same matrices. The setup was one sample per problem, an 8k cap and a paired bootstrap.
| Benchmark | Original | v1 | Random-edit control |
|---|---|---|---|
| MBPP-test pass@1 (500) | 3.8% | 38.0% | 1.6% |
| HumanEval+ pass@1 (164) | 2.4% | 48.2% | 1.8% |
| Open-ended prompts answered (30) | 0/30 | 30/30 | 0/30 |
| Prompts without a repetition loop (100, 32k cap) | 39% | 98% | 14% |
For the quantised original, the parent's Q4_K_M already concludes more often than its bf16 version. Under the same 8k setup it answered 6 of 30 open-ended prompts and passed 26 of 164 HumanEval+ problems (15.9%).
Limitations
- v2 has not had its own held-out, controlled confirmation. Its numbers come from the screening data that was used to choose it.
- Second-guessing is much rarer, not gone. Deliberation can also appear in code comments, which the counter does not read.
- "Answered" does not mean "correct". This is a 1.7B model, and free-form code, for example programs to compute pi, can contain placeholder or wrong code.
- Thinking is short. Thinking for longer was tested and did not pay off on this model.
- Narrow test conditions. One sampler setting (temperature 0.1), one sample per problem and English coding prompts only. Behaviour with thinking off, at other temperatures or on non-coding tasks was not measured.
- Inherited behaviour. The parent's abliteration and distillation carry over unchanged. See the parent's card for their capability notes.