Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- README.md +39 -0
- gemma-3-27b-it-abliterated.q2_k.gguf +3 -0
- gemma-3-27b-it-abliterated.q3_k_m.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
gemma-3-27b-it-abliterated.q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gemma-3-27b-it-abliterated.q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
+
base_model: google/gemma-3-27b-it
|
| 6 |
+
tags:
|
| 7 |
+
- autoquant
|
| 8 |
+
- gguf
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# 💎 Gemma 3 27B IT Abliterated
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
<center><a href="https://huggingface.co/mlabonne/gemma-3-4b-it-abliterated">Gemma 3 4B Abliterated</a> • <a href="https://huggingface.co/mlabonne/gemma-3-12b-it-abliterated">Gemma 3 12B Abliterated</a></center>
|
| 15 |
+
|
| 16 |
+
This is an uncensored version of [google/gemma-3-27b-it](https://huggingface.co/google/gemma-3-27b-it) created with a new abliteration technique.
|
| 17 |
+
See [this article](https://huggingface.co/blog/mlabonne/abliteration) to know more about abliteration.
|
| 18 |
+
|
| 19 |
+
I was playing with model weights and noticed that Gemma 3 was much more resilient to abliteration than other models like Qwen 2.5.
|
| 20 |
+
I experimented with a few recipes to remove refusals while preserving most of the model capabilities.
|
| 21 |
+
|
| 22 |
+
Note that this is fairly experimental, so it might not turn out as well as expected.
|
| 23 |
+
|
| 24 |
+
I recommend using these generation parameters: `temperature=1.0`, `top_k=64`, `top_p=0.95`.
|
| 25 |
+
|
| 26 |
+
## ✂️ Layerwise abliteration
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
|
| 30 |
+
In the original technique, a refusal direction is computed by comparing the residual streams between target (harmful) and baseline (harmless) samples.
|
| 31 |
+
|
| 32 |
+
Here, the model was abliterated by computing a refusal direction based on hidden states (inspired by [Sumandora's repo](https://github.com/Sumandora/remove-refusals-with-transformers/)) for each layer, independently.
|
| 33 |
+
This is combined with a refusal weight of 1.5 to upscale the importance of this refusal direction in each layer.
|
| 34 |
+
|
| 35 |
+
This created a very high acceptance rate (>90%) and still produced coherent outputs.
|
| 36 |
+
|
| 37 |
+
## ⚡️ Quantization
|
| 38 |
+
|
| 39 |
+
TBD.
|
gemma-3-27b-it-abliterated.q2_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89a8a00f2e58bdcfb3da7d41196830988c56c1e4669f2413cb50a22aa394315a
|
| 3 |
+
size 10503720672
|
gemma-3-27b-it-abliterated.q3_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a5d2259cd1cba809f9f7681574f70e015dba40ffdcf58701e60e7c1ddc8f653
|
| 3 |
+
size 13437640416
|