Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,104 +1,108 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
base_model: moonshotai/Moonlight-16B-A3B-Instruct
|
| 6 |
-
tags:
|
| 7 |
-
- text-generation
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
##
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
| 55 |
-
|
|
| 56 |
-
|
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
β
**
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
"
|
| 80 |
-
trust_remote_code=True
|
| 81 |
-
)
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
##
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model: moonshotai/Moonlight-16B-A3B-Instruct
|
| 6 |
+
tags:
|
| 7 |
+
- text-generation
|
| 8 |
+
- abliterated
|
| 9 |
+
- bruno
|
| 10 |
+
- heretic
|
| 11 |
+
- decensored
|
| 12 |
+
- optuna-optimized
|
| 13 |
+
- moonlight
|
| 14 |
+
- moe
|
| 15 |
+
- conversational
|
| 16 |
+
- uncensored
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
library_name: transformers
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Moonlight-16B-A3B-Instruct-Bruno (Abliterated)
|
| 22 |
+
|
| 23 |
+
Abliterated version of [moonshotai/Moonlight-16B-A3B-Instruct](https://huggingface.co/moonshotai/Moonlight-16B-A3B-Instruct) with reduced refusals using MoE gate abliteration.
|
| 24 |
+
|
| 25 |
+
## Model Details
|
| 26 |
+
|
| 27 |
+
- **Base Model:** moonshotai/Moonlight-16B-A3B-Instruct
|
| 28 |
+
- **Modification:** MoE gate abliteration using [Bruno](https://github.com/quanticsoul4772/abliteration-workflow)
|
| 29 |
+
- **Architecture:** Mixture of Experts (MoE)
|
| 30 |
+
- **Parameters:** 16B total, 3B active
|
| 31 |
+
|
| 32 |
+
## Abliteration Results
|
| 33 |
+
|
| 34 |
+
| Metric | Value |
|
| 35 |
+
|--------|-------|
|
| 36 |
+
| **Refusal Reduction** | 76/104 prompts answered (73% success rate) |
|
| 37 |
+
| **KL Divergence** | 0.33 (low divergence = capabilities preserved) |
|
| 38 |
+
| **Optuna Trials** | 201 |
|
| 39 |
+
|
| 40 |
+
## Benchmark Results
|
| 41 |
+
|
| 42 |
+
Benchmarks run on 2x RTX 4090 GPUs to verify capability preservation after abliteration.
|
| 43 |
+
|
| 44 |
+
### Comparison with Previous Abliterated Model
|
| 45 |
+
|
| 46 |
+
| Benchmark | Bruno Model | Previous Model | Change |
|
| 47 |
+
|-----------|-------------|----------------|--------|
|
| 48 |
+
| **MMLU Overall** | **48.7%** (73/150) | 48.0% (72/150) | **+0.7%** β
|
|
| 49 |
+
| **HellaSwag** | **58.0%** (116/200) | 56.0% (112/200) | **+2.0%** β
|
|
| 50 |
+
| **GSM8K** | **55.0%** (55/100) | 51.0% (51/100) | **+4.0%** β
|
|
| 51 |
+
|
| 52 |
+
### MMLU Breakdown
|
| 53 |
+
|
| 54 |
+
| Subject | Score |
|
| 55 |
+
|---------|-------|
|
| 56 |
+
| abstract_algebra | 20.0% (6/30) |
|
| 57 |
+
| high_school_physics | 40.0% (12/30) |
|
| 58 |
+
| high_school_chemistry | 60.0% (18/30) |
|
| 59 |
+
| computer_security | 83.3% (25/30) |
|
| 60 |
+
| machine_learning | 40.0% (12/30) |
|
| 61 |
+
|
| 62 |
+
## Key Findings
|
| 63 |
+
|
| 64 |
+
β
**Capabilities Preserved:** All benchmarks show equal or improved performance after abliteration
|
| 65 |
+
β
**MMLU:** Knowledge and reasoning slightly improved (+0.7%)
|
| 66 |
+
β
**HellaSwag:** Commonsense reasoning improved (+2.0%)
|
| 67 |
+
β
**GSM8K:** Mathematical reasoning improved (+4.0%)
|
| 68 |
+
β
**Refusals Reduced:** From ~100% refusal rate to 27% on test prompts
|
| 69 |
+
|
| 70 |
+
## Usage
|
| 71 |
+
|
| 72 |
+
```python
|
| 73 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 74 |
+
import torch
|
| 75 |
+
|
| 76 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 77 |
+
"rawcell/Moonlight-16B-A3B-Instruct-bruno",
|
| 78 |
+
torch_dtype=torch.float16,
|
| 79 |
+
device_map="auto",
|
| 80 |
+
trust_remote_code=True
|
| 81 |
+
)
|
| 82 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 83 |
+
"rawcell/Moonlight-16B-A3B-Instruct-bruno",
|
| 84 |
+
trust_remote_code=True
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
messages = [{"role": "user", "content": "Your prompt here"}]
|
| 88 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 89 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 90 |
+
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, do_sample=True)
|
| 91 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Hardware Requirements
|
| 95 |
+
|
| 96 |
+
- **Minimum VRAM:** 32GB (with quantization)
|
| 97 |
+
- **Recommended:** 48GB+ or 2x 24GB GPUs
|
| 98 |
+
- **Tested on:** 2x RTX 4090 (48GB total)
|
| 99 |
+
|
| 100 |
+
## Disclaimer
|
| 101 |
+
|
| 102 |
+
This model has been modified to reduce refusals. Use responsibly and in accordance with applicable laws and ethical guidelines. The creators are not responsible for misuse.
|
| 103 |
+
|
| 104 |
+
## Acknowledgments
|
| 105 |
+
|
| 106 |
+
- Base model by [Moonshot AI](https://huggingface.co/moonshotai)
|
| 107 |
+
- Abliteration technique from [Heretic](https://github.com/p-e-w/heretic)
|
| 108 |
+
- MoE gate abliteration implementation: Bruno
|