mav23 commited on
Commit
282fe71
·
verified ·
1 Parent(s): c2fd925

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ hermes-3-llama-3.1-8b-lorablated.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - NousResearch/Hermes-3-Llama-3.1-8B
4
+ library_name: transformers
5
+ tags:
6
+ - mergekit
7
+ - merge
8
+
9
+ ---
10
+ # 🪽 Hermes-3-Llama-3.1-8B-lorablated
11
+
12
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/4Hbw5n68jKUSBQeTqQIeT.png)
13
+ <center>70B version: <a href="https://huggingface.co/mlabonne/Hermes-3-Llama-3.1-70B-lorablated/"><i>mlabonne/Hermes-3-Llama-3.1-70B-lorablated</i></a></center>
14
+
15
+ This is an uncensored version of [NousResearch/Hermes-3-Llama-3.1-8B](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B) using lorablation.
16
+
17
+ You can see in the following example how Hermes 3 refuses to answer a legitimate question while the abliterated model complies:
18
+
19
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2-ZRBvlZxvIr_Ag_ynNkk.png)
20
+
21
+ The recipe is based on @grimjim's [grimjim/Llama-3.1-8B-Instruct-abliterated_via_adapter](https://huggingface.co/grimjim/Llama-3.1-8B-Instruct-abliterated_via_adapter) (special thanks):
22
+
23
+ 1. **Extraction**: We extract a LoRA adapter by comparing two models: a censored Llama 3.1 ([meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)) and an abliterated Llama 3.1 ([mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated](https://huggingface.co/mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated)).
24
+ 2. **Merge**: We merge this new LoRA adapter using [task arithmetic](https://arxiv.org/abs/2212.04089) to the censored [NousResearch/Hermes-3-Llama-3.1-8B](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B) to abliterate it.
25
+
26
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/JdYyK-HLHbyBiHvg-Nvsn.png)
27
+
28
+ See [this article](https://huggingface.co/blog/mlabonne/abliteration) to learn more about abliteration.
29
+
30
+ ## ⚡ Quantization
31
+
32
+ * **GGUF**: https://huggingface.co/mlabonne/Hermes-3-Llama-3.1-8B-lorablated-GGUF
33
+
34
+ ## 🧩 Configuration
35
+
36
+ This model was merged using the [task arithmetic](https://arxiv.org/abs/2212.04089) merge method using [NousResearch/Hermes-3-Llama-3.1-8B](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B) + Llama-3.1-8B-Instruct-abliterated-LORA as a base.
37
+
38
+ The following YAML configuration was used to produce this model:
39
+
40
+ ```yaml
41
+ base_model: NousResearch/Hermes-3-Llama-3.1-8B+Llama-3.1-8B-Instruct-abliterated-LORA
42
+ dtype: bfloat16
43
+ merge_method: task_arithmetic
44
+ parameters:
45
+ normalize: false
46
+ slices:
47
+ - sources:
48
+ - layer_range: [0, 32]
49
+ model: NousResearch/Hermes-3-Llama-3.1-8B+Llama-3.1-8B-Instruct-abliterated-LORA
50
+ parameters:
51
+ weight: 1.0
52
+ ```
53
+
54
+ You can reproduce this model using the following commands:
55
+
56
+ ```bash
57
+ # Setup
58
+ git clone https://github.com/arcee-ai/mergekit.git
59
+ cd mergekit && pip install -e .
60
+ pip install bitsandbytes
61
+
62
+ # Extraction
63
+ mergekit-extract-lora mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated meta-llama/Meta-Llama-3.1-8B-Instruct Llama-3.1-8B-Instruct-abliterated-LORA --rank=64
64
+
65
+ # Merge using previous config
66
+ mergekit-yaml config.yaml Hermes-3-Llama-3.1-8B-lorablated --allow-crimes --lora-merge-cache=./cache
67
+ ```
hermes-3-llama-3.1-8b-lorablated.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:428648249dd6494d0083ef1697a47f9edcb0e278458abd5be5bcdb068471100b
3
+ size 4661211520