Downloads · 30 days
5
0% of all-time downloads
electroglyph/gemma-3-4b-it-unslop-GRPO
gemma-3-4b-it-unslop-GRPO is a image-text-to-text model from electroglyph. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as gemma.
Downloads · 30 days
5
0% of all-time downloads
All-time downloads
1.1K
Public
Repo size
3.1 GB
Likes
3
Public
Click a slice to open those files.
.gguf2.5 GB · 81%
From the Hugging Face model README
v2 of this model is here
Okay, I've received some good feedback.
This finetune is mostly geared towards fiction writing, unfortunately all the RP slop is still present.
Also, intelligence has been damaged a bit, as instruction following isn't great sometimes.
On the plus side, I'm pretty happy with it's new writing style when it does work.
Changes for the next version:
This is my first finetune. I used GRPO to reduce slop output.
This is a LoRA adapter, it needs to be merged with google/gemma-3-4b-it
I'll also upload a Q4_K_M GGUF made with unsloth's imatrix.
Tuning technique:
I generated lots of sample text and then sorted all bigrams and trigrams by frequency.
I added some of these to the reward function and penalized their use.
I also added some regex filters for comma overuse, and some sloppy phrasing, etc.
If the prompt doesn't include "rain", but model output includes rain, it gets penalized.
Same thing for "air". Gemma 3 LOVES to talk about rain and how the air tastes (or clings, etc.)... no more.
200 steps into training I activate lexical diversity comparison. It penalizes MTLD < 100, gives increasing rewards up to 120.
There's a callback for early stopping if reward stays high, but it didn't kick in this run.
This was trained on ~15 million tokens on a single 3090. I'm sharing my code so people can try their own finetuning runs.
I'll probably keep iterating on this a bit, and may update this model.
training code: train.py
I can't share my dataset, but here's an example of what it looks like: dataset_example.json
Gemma 3 4b common bigrams, most common first: bigrams.txt
Gemma 3 4b common trigrams, most common first: trigrams.txt