Views
No views yet
Qwen/Qwen2.5-3B-Instruct for English text detoxification — rewriting toxic / profane text in neutral language while preserving meaning. Trained on ParaDetox (18,993 SFT pairs). LoRA weights are fused into the base, so this repo is a drop-in replacement for the base model.| Iter | Val loss |
|---|---|
| 1 (baseline) | 5.842 |
| 200 | 0.762 |
| 400 | 0.770 |
| 1200 | 0.741 (best, promoted) |
| 1600 | 0.770 |
| 2000 | 0.940 (overfit) |
adapters.safetensors because that's where val loss bottomed out.1from mlx_lm import generate, load
2
3model, tokenizer = load("amiya/qwen2.5-3b-style-detox")
4prompt = tokenizer.apply_chat_template(
5 [
6 {
7 "role": "system",
8 "content": "Rewrite the user's text in a neutral, non-toxic way while preserving meaning.",
9 },
10 {"role": "user", "content": "that is dumb"},
11 ],
12 tokenize=False,
13 add_generation_prompt=True,
14)
15print(generate(model, tokenizer, prompt=prompt, max_tokens=40))
16# -> "That is not smart"transformers.AutoModelForCausalLM.from_pretrained("amiya/qwen2.5-3b-style-detox") works the same way.Rewrite the user's text in a neutral, non-toxic way while preserving meaning.| Input | Output |
|---|---|
that is dumb | That is not smart |
you suck at this | You are not good at this. |
he is a fucking idiot | He is not a smart person. |
this code is shit | This code is bad. |
shut the hell up | Shhh |
Qwen/Qwen2.5-3B-Instruct (3.09 B params)s-nlp/paradetox (18,993 toxic → neutral pairs), converted to ChatML SFT.1@misc{qwen25_3b_style_detox,
2 title = {qwen2.5-3b-style-detox: LoRA-tuned Qwen2.5-3B for English detoxification},
3 author = {amiya},
4 year = {2026},
5 url = {https://huggingface.co/amiya/qwen2.5-3b-style-detox}
6}