Upload ./README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: gemma
|
3 |
+
library_name: transformers
|
4 |
+
pipeline_tag: image-text-to-text
|
5 |
+
base_model: google/gemma-3-27b-it
|
6 |
+
---
|
7 |
+
### exl2 quant (measurement.json in main branch)
|
8 |
+
---
|
9 |
+
### check revisions for quants
|
10 |
+
---
|
11 |
+
|
12 |
+
|
13 |
+
# 💎 Gemma 3 27B IT Abliterated
|
14 |
+
|
15 |
+

|
16 |
+
<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>
|
17 |
+
|
18 |
+
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.
|
19 |
+
See [this article](https://huggingface.co/blog/mlabonne/abliteration) to know more about abliteration.
|
20 |
+
|
21 |
+
I was playing with model weights and noticed that Gemma 3 was much more resilient to abliteration than other models like Qwen 2.5.
|
22 |
+
I experimented with a few recipes to remove refusals while preserving most of the model capabilities.
|
23 |
+
|
24 |
+
Note that this is fairly experimental, so it might not turn out as well as expected.
|
25 |
+
|
26 |
+
I recommend using these generation parameters: `temperature=1.0`, `top_k=64`, `top_p=0.95`.
|
27 |
+
|
28 |
+
## ⚡️ Quantization
|
29 |
+
|
30 |
+
* **GGUF**: https://huggingface.co/mlabonne/gemma-3-27b-it-abliterated-GGUF
|
31 |
+
|
32 |
+
## ✂️ Layerwise abliteration
|
33 |
+
|
34 |
+

|
35 |
+
|
36 |
+
In the original technique, a refusal direction is computed by comparing the residual streams between target (harmful) and baseline (harmless) samples.
|
37 |
+
|
38 |
+
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.
|
39 |
+
This is combined with a refusal weight of 1.5 to upscale the importance of this refusal direction in each layer.
|
40 |
+
|
41 |
+
This created a very high acceptance rate (>90%) and still produced coherent outputs.
|