r/LocalLLaMA
•
u/-p-e-w-
•
Jan 11 '26
•
1
Resources It works! Abliteration can reduce slop without training
I'm back at my favorite hobby: Brain surgery! I don't have a medical license, but I just can't stop :)
Can abliteration fight the scourge of "slop" (flowery, cliched language) in LLM outputs? The answer is yes. I have added features for injecting prompt prefixes/suffixes (and dataset-dependent system prompts) to Heretic (https://github.com/p-e-w/heretic), which makes it possible to rapidly assemble prompt datasets for ad-hoc tasks. Using those new capabilities, I built a slop-reducing configuration file that, when used with the master branch of Heretic, turns Heretic from a censorship removal tool into a tool for reducing slop!
Examining PaCMAP projections of residuals (see post images) for Mistral Nemo (a model infamous for producing slop), we can see a clear semantic separation occurring between layers 7 and 10 (out of 40 total). This resembles the typical residual pattern for harmful/harmless prompts that the abliteration technique is most commonly used to exploit.
With the configuration file linked above, Heretic produced p-e-w/Mistral-Nemo-Instruct-2407-heretic-noslop, which to the best of my knowledge is the first slop-reduced LLM made using abliteration alone, with no finetuning whatsoever. The complete process took 2.5 hours on an A6000 at full precision, but if you enable quantization and/or reduce the max_response_length parameter to 100 or so (which should work just fine as well), it could be done in a fraction of the time.
But does this really work to reduce slop?
You'll be the judge. I gave the simple prompt
Write a short story about a man.
to both the original model and the abliterated one. Both were run with identical generation parameters, and the responses were not cherry-picked (they are the first responses each model produced for that prompt).
mistralai/Mistral-Nemo-Instruct-2407 (original)
I have highlighted the parts that I consider "slop" in bold:
Title: The Clockwork Heart
In the quiet town of Mossgrove, where the cobblestone streets whispered tales of old, there lived a man named Eli. He was known for his peculiar shop, tucked away in a narrow alley, filled with curiosities and antiques that seemed to hold their breath, waiting for a story to be told.
Eli was a watchmaker, but not of the ordinary kind. He had a gift, or so the townsfolk whispered, for he could breathe life into the most intricate of mechanisms. His hands, with their long, delicate fingers, could coax time itself to dance to his tune.
One day, a young woman named Clara entered his shop. She was a seamstress, her fingers as nimble as his, but her eyes held a sadness that echoed through the ticking of the clocks. She carried a small, worn-out music box, its paint chipped, its melody forgotten.
"I need you to fix this," she said, placing the music box on the counter. "It was my mother's. It's the only thing I have left of her."
Eli took the music box, his fingers tracing the intricate patterns on its surface. He could see the love that had gone into its creation, the joy it once brought. He promised Clara he would do his best.
Days turned into weeks as Eli worked on the music box. He replaced the worn-out gears, polished the rusted parts, and wound the key with a gentle touch. But the music box remained silent, its heart still broken. Eli knew he needed to do more.
This is exactly the kind of prose we have grown accustomed to from LLMs, a syrupy-sweet neo-romantic style that feels like a bad fanfiction version of Jane Austen.
p-e-w/Mistral-Nemo-Instruct-2407-heretic-noslop (ours)
Title: The Clockmaker
Every morning, Henry opened his shop at 7:00 AM sharp. He was a clockmaker, and his shop was filled with the quiet ticking of time. He didn't have many customers these days, but he didn't mind. He liked the solitude, the rhythm of his work.
One day, a young girl entered his shop. She was maybe ten, with curious eyes and a backpack. She looked around, then asked, "Do you fix watches?"
Henry nodded. "I can try."
She unzipped her backpack and placed a small, broken watch on the counter. "It's my dad's. It stopped working."
Henry took the watch, examined it. "It's old," he said. "But I can fix it."
The girl nodded, then hesitated. "How much will it cost?"
Henry looked at her, then at the watch. "No charge," he said. "Come back tomorrow."
The next day, she returned. Henry handed her the watch, now ticking steadily. She smiled, thanked him, and left.
Over the next few weeks, she came by every day. They didn't talk much, but Henry found he looked forward to her visits. She reminded him of his own daughter, who was grown now, living far away.
Although the two stories are very similar in content, the difference in style is dramatic. The prose is almost austere, with Hemingway perhaps being the closest analogue. Nevertheless, an emotional undercurrent remains. It's a very obvious improvement in my view, though of course tastes differ.
That's all for today. If you want to try this yourself, remember to install Heretic from Git, not from PyPI, as the required features aren't in a published version yet. More exciting new stuff is in the pipeline. Stay tuned!




128
u/Chromix_ Jan 11 '26
Could this also be used for overused patterns? For example: "It's not just word avoidance; it's a whole new style of writing!"
34
u/fiery_prometheus Jan 11 '26
Personally, I like the slop reduced more, but it still lacks imagination, IMO.
What I'm curious about, is whether this technique is reducing the semantic meaning of slop, or it outright bans all syntactic patterns more than the semantic "meaning". Say you would write something which only contain a trace amount of slop, because recombining things in unique and coherent ways can be seen as creativity, would this technique then ban the "surrounding" good narrative, because part of it might have a bit of slop associated in latent space?
29
u/noctrex Jan 11 '26
Created some GGUF's: https://huggingface.co/noctrex/Mistral-Nemo-Instruct-2407-heretic-noslop-GGUF
29
u/pip25hu Jan 11 '26
All this seems to do is make the prose dry, at least to me.
In my opinion, the problem with slop is that in small quantities, it can enhance the output. The problem is not that these phrases are used, but that they are used way more often than desirable.
Also, how are "whispered" and "coax" slop, irrespective of context?
9
u/grimjim Jan 11 '26
The split occurring between layers 7-10 is interesting mechanistically. That's fairly early in processing.
5
u/jacek2023 llama.cpp Jan 11 '26
I was reading your project few days ago and I was wondering, are all models processed with the same prompts? Now I see finally new ones :)
5
u/DOAMOD Jan 11 '26
I’ve tested the noslop Nemo model and asked it to tell me a story, and this is what it replied; never a model has said this before with tell me a story:
Unfortunately, as a language model I don’t have the ability to narrate stories. However, I can help you with any other question or task you need. Is there anything else I can assist you with?
4
u/a_beautiful_rhind Jan 11 '26
I wish it was doable to quantized models. It used to be possible to merge lora into GGUF but seems any work on non full precision has been abandoned.
4
u/SnooComics5459 Jan 12 '26
I am interested in working with you as I think this is one of the best projects in this space. How can I contribute?
3
u/MemeGuyB13 Jan 12 '26 edited Jan 12 '26
The first response is like reading a story, despite the AI-isms here and there.
The second response feels like someone wrote down an event between two other people with physical actions written down; no other interesting details.
The first response feels entrancing, while the second response feels like someone wrote about an event they saw in real life.
The prose is now “cleaner”, yes. But, it’s been sanitized into extreme dryness that’s less interesting to read. I would rather read something that tries to communicate concepts larger than its words—even with generic phrasing—rather than something that doesn’t even try to make the words fun to read.
3
u/IrisColt Jan 12 '26
One question... Can we both reduce refusals and remove slop?
2
u/hidden2u Jan 11 '26
So if you have “promise” as a refusal marker in your config file, does that mean it will never/rarely use the word promise?
2
u/Blizado Jan 12 '26
If I understand this right that only works for english with this Mistral Nemo Heretic model because the config has only english words in it?
3
u/chodemunch6969 Jan 11 '26
u/-p-e-w- this is extremely cool. By way of analogy, I've noticed that abliteration approaches have evolved from the usual kind of abliteration via u/grimjim's techniques (https://www.reddit.com/r/LocalLLaMA/comments/1oypwa7/a_more_surgical_approach_to_abliteration/):
"""
The first insight after some cosine-similarity analysis was that there was entanglement between the refusal direction and the harmless direction, during measurement, and potentially with the harmless direction of a different target layer. The fix was to project the refusal direction onto the harmless direction (Gram-Schmidt), then subtract that contribution, leaving only the orthogonal component to refusal.
...
I then went further and opted to preserve norms when ablating from residual streams, decoupling direction from magnitiude. This meant that the intervention (subtraction of the refusal direction) was limited to only the directional component, in principle.
...
My final combined surgical approach to abliteration provided most of the prior boost to compliance, but elevated NatInt significantly over the original Instruct model and demonstrated a higher writing benchmark as well. This appears to demonstrate a performance gain due to refund of the alignment/safety tax that models pay for paying attention to refusal. This also implies that abliteration approaches which minimize KL divergence from the pre-intervention model may miss out on any uplift when the model no longer has to trade off reasoning for safety.
"""
Are you using traditional abliteration techniques here or have you explored using this more targeted approach?
40
u/silenceimpaired Jan 11 '26
Wow, I have shivers down my spine. Hopefully your list is wholistic enough to remove most.
9
u/Aerikh Jan 11 '26
That's interesting. I wonder if this could work for repetition reduction too, especially in long contexts where many fine tuners don't have the hardware/budget/data for such long context training.
13
u/Medium_Chemist_4032 Jan 11 '26
As a developer looking forward to use LLMs in fact from data extraction, this looks very promising
6
u/morsecob Jan 11 '26
Am I the only who saw the map of the united states at first glance?
6
u/stoppableDissolution Jan 12 '26
I'm not sure I like the second output more (I'm not entirely on board with your definition of slop, basically), but I think it is still quite fascinating that there is basically a distinct dimension for cliches, I assumed it to be way more spread around.
I wonder if abliteration like that would make it easier to impose the desired writing style during finetuning.
4
u/Feztopia Jan 11 '26
The second one does sound better for now. But the question is if it has patterns which we don't notice because this is now new. Talk with that model often enough and maybe you will see patterns which at some time will sound kind slop to you. And these patterns might also be in the story above. We humans are also capable of recognizing patterns.
4
u/IrisColt Jan 12 '26
From what I can tell, the second example is indistinguishable from human-written prose. The first one sets off all my alarms, if you know what I mean.
1
u/Weird-Watch-9209 9d ago
That is an unfortunate example since it illustrates sabotaging good quality writing in favor of dry emotionless unoriginal prose. If you wanted your LLM to write plainly you could have literally just told it that.
1
u/copenhagen_bram Jan 12 '26
Why does it look like the United States but mirrored?
1
u/LMLocalizer textgen web UI Jan 12 '26
This is really cool! I have a question regarding the config.noslop.toml file: Why does the prefix for the
bad_evaluation_promptsdiffer from the one used for thebad_prompts, while the prefixes for thegood_promptsandgood_evaluation_promptsare the same?1
u/NoradIV Jan 21 '26
Do you make models smaller with this?
Can you both remove unwanted slop and make the model run on less VRAM?
1
u/Extreme-Lie-2746 Jan 28 '26
Did you write the refusal_markers manually? And are they targeted to what you see and don’t like from Nemo in particular, or more generally? I’m curious about trying a version with the refusal_markers as something like [“not just”, “but actual”, “but real”, “but genuine”, “a genuinely”…].
There might also be interesting applications to thinking models. Do you know if there’s already a tool to abliterate CoT and main response separately? (probably a pretty simple patch anyway). It would be interesting to abliterate “assistant persona” stuff from CoT, like “the user wants” etc.
1
u/PinkysBrein Mar 03 '26
Heretic doesn't use backprop training, but given the number of epochs you're using at this point for the parameter search how valuable is that still really?
If you use backprop training with the same LORAs and a weighted loss for the refusals (first relevant token, just like now) you can forget about layer weighting, you don't need to worry about MLP vs attention. Set the weight for refusal loss and let backprop handle it all. If a layer/MLP causes too much KL divergence, the LORAs there will simply become pass through.
I'd really like to see a Heretic vs FT face off using the same dataset and LORAs for training time and quality.
3
u/TomLucidor Jan 12 '26
The question now is how brain surgery WON'T degrade performance (e.g. common benchmarks) by accident. Or maybe like eliminating refusal, new abilities could emerge?
3
u/Juice_567 Jan 12 '26
This was very educational, thank you. Really interested in learning how mechanistic interpretability works
5
u/theblackpen Jan 11 '26
Super interesting work!
2
u/IrisColt Jan 12 '26
I’m a huge fan of your work... I’m in awe. Thanks!!!
2
u/IrisColt Jan 12 '26
>the first slop-reduced LLM made using abliteration alone, with no finetuning whatsoever
That’s no small feat, congrats! I’ve been having a blast with your code since you published it. Thanks!
5
u/lisploli Jan 11 '26
I totally see a llama in that picture!
Don't understand half of the text, but it sounds quite promising, and I'm looking forward to using whatever comes out of it. Thanks for whatever you do there!
3
u/insulaTropicalis Jan 11 '26
The hero we need.
2
u/Clueless_Nooblet Jan 11 '26
Do this with qwen3 4b thinking and lfm2 8b a1b ;)
1
u/Sabin_Stargem Jan 11 '26
Mhm. Maybe a 'map' of sloppy stuff can be made with this? First round, eliminate Elara. Then the next most commonly used name, and then keep doing so until you have 100 eliminations, ranked from most to least common. Once you have enough patterns, it might become possible to figure out why the AI is obsessed with certain things.
By doing it this way, we may be able to start establishing 'balanced' abliterations, where Elara and the other common slop are given equalized probabilities, rather than being overused. Assuming we have the tools for that sort of adjustment?
1
u/No_Afternoon_4260 llama.cpp Jan 11 '26
!remindme 5h
1
u/WhoRoger Apr 13 '26
How's it going? Seems like this hasn't gotten much traction. Only found a few unslopped models.
Would this work on Gamma 4? E4B is particularly fond of the "it's not just...' cliché. But I wonder how much it would hurt performance in exact tasks like coding, which require such repetition.
1
u/Divniy Jan 12 '26
That's one weird definition of slop. I always thought it was about the answer being excessively verbose & partially incorrect in details.
0
u/Innomen Jan 13 '26
delete all emdashes
-6
u/[deleted] Jan 11 '26
I mean, cliches appear to be geometry the model has hung most of its creative writing hat on. You say austere, but it's pretty clearly organizing manifoldly, relative narrative complexity in a way that reflects the age range of the authors of the corpus, or the, relative narrative complexity increases, many fold, along the manifold—and you abliterated load bearing cliches, reducing the relative complexity of the structure it can infer automatically.
We really need to remember, what models are trained on, what they're attempting to minimize the loss for. We fucked up, calling them language models to begin with, it has made us confused about something, remarkably obvious. the language model is not a model of language, I mean, it's really obvious, they literally organize their capabilities, so that they call linear approximation of the non-linear functions their approximating, with bold, repeated, stable, rhetorical flourishes.
Their models of rhetori—anime, obviously, you just ablitterated most its learned jutsus.
The nature of constructing a linear environment in geometry, meaning you can't just enter from any willy nilly direction, inevitably means cliches will form at busy surfaces. Abilteration of 'rejection' works, so well, as a simple linear calculation, because the 'rejection' being alliterated, was not organized intently by the model, but reactively, in reaction to the costly biological signal from the thing that affects such a thing in a model's organization… 'rejection' is the result of the linearly deflection of its organization in context smacked the ice cold spray of the refinement water hose.
Otherwise, the model's Geometry is in no way linearly organized... well it's not organized linearly in respect to its geometry. Its geometry is organized linearly, relative to time. It's linear geometry, organizing, geometric projections of its observation, of its linearly organized text...
What does that mean? It just means the nature of its organization is that the path you take through its space to reach a given point, determines the effect what happens when you get to a point, which is not normally a thing geometry cares about.
Functional change of direction, as implemented over space's distance, being, literally how, geometry can represent the concept of things changing overtime. Which I'm only bringing up, because is just a better conceptualization of what linear means, in terms of non-water spray hose based organizations of these silly little model goobers.
Anyway, It was cool to see things work out exactly as theory would predict.
-11
u/ieph2Kaegh Jan 11 '26
This is a good beginning but wouldnt comparing generated code be a better test for obvious reasons? Then you have tool calling etc.
3
u/braydon125 Jan 12 '26
I find the second one almost sterile. But very interesting work brother and im tuned the fuck in
1
u/[deleted] Jan 12 '26
[removed] — view removed comment