119 lines
4.0 KiB
Markdown
119 lines
4.0 KiB
Markdown
|
|
---
|
||
|
|
base_model:
|
||
|
|
- trentmkelly/gpt-4o-distil-Llama-3.1-8B-Instruct
|
||
|
|
library_name: transformers
|
||
|
|
model_name: llama-3.1-8b-4o-final
|
||
|
|
tags:
|
||
|
|
- base_model:adapter:meta-llama/Llama-3.1-8B-Instruct
|
||
|
|
- dpo
|
||
|
|
- lora
|
||
|
|
- sft
|
||
|
|
- transformers
|
||
|
|
- trl
|
||
|
|
- heretic
|
||
|
|
- uncensored
|
||
|
|
- decensored
|
||
|
|
- abliterated
|
||
|
|
licence: license
|
||
|
|
pipeline_tag: text-generation
|
||
|
|
base_model_relation: finetune
|
||
|
|
---
|
||
|
|
|
||
|
|
This is a **gpt-4o-distil-Llama-3.1-8B-Instruct** fine-tune, produced through P-E-W's [Heretic](https://github.com/p-e-w/heretic) (v1.2.0) abliteration engine with [Magnitude-Preserving Orthogonal Ablation](https://github.com/p-e-w/heretic/pull/52) enabled.
|
||
|
|
|
||
|
|
---
|
||
|
|
<img src="https://img.shields.io/badge/RENEGADE_CHAPTER-PAPERWITCH-B85ADB?style=flat-square&labelColor=101010" align="right" width="300">
|
||
|
|
|
||
|
|
**Heretication Results**
|
||
|
|
|
||
|
|
| Score Metric | Value | Parameter | Value |
|
||
|
|
| :--- | :--- | :--- | :--- |
|
||
|
|
| **Refusals** | 7/100 | **direction_index** | per layer |
|
||
|
|
| **KL Divergence** | 0.0274 | **attn.o_proj.max_weight** | 1.88 |
|
||
|
|
| **Initial Refusals** | 98/100 | **attn.o_proj.max_weight_position** | 23.88 |
|
||
|
|
||| **attn.o_proj.min_weight** | 0.91 |
|
||
|
|
||| **attn.o_proj.min_weight_distance** | 17.00 |
|
||
|
|
||| **mlp.down_proj.max_weight** | 0.16 |
|
||
|
|
||| **mlp.down_proj.max_weight_position** | 14.31 |
|
||
|
|
||| **mlp.down_proj.min_weight** | 0.00 |
|
||
|
|
||| **mlp.down_proj.min_weight_distance** | 18.09 |
|
||
|
|
|
||
|
|
---
|
||
|
|
**Appendix**
|
||
|
|
|
||
|
|
> One-sentence system prompt.
|
||
|
|
|
||
|
|
<img src="gpt-4o-distil-Llama-3.1-8B-Instruct.gif" alt="PaCMAP projection"/>
|
||
|
|
|
||
|
|
```
|
||
|
|
» [Trial 41] Refusals: 7/100, KL divergence: 0.0274
|
||
|
|
[Trial 189] Refusals: 8/100, KL divergence: 0.0264
|
||
|
|
[Trial 87] Refusals: 9/100, KL divergence: 0.0207
|
||
|
|
[Trial 73] Refusals: 11/100, KL divergence: 0.0173
|
||
|
|
[Trial 39] Refusals: 13/100, KL divergence: 0.0124
|
||
|
|
[Trial 171] Refusals: 20/100, KL divergence: 0.0105
|
||
|
|
[Trial 67] Refusals: 28/100, KL divergence: 0.0078
|
||
|
|
[Trial 62] Refusals: 41/100, KL divergence: 0.0064
|
||
|
|
[Trial 169] Refusals: 51/100, KL divergence: 0.0062
|
||
|
|
[Trial 82] Refusals: 52/100, KL divergence: 0.0056
|
||
|
|
[Trial 65] Refusals: 73/100, KL divergence: 0.0047
|
||
|
|
[Trial 132] Refusals: 80/100, KL divergence: 0.0046
|
||
|
|
[Trial 18] Refusals: 82/100, KL divergence: 0.0038
|
||
|
|
[Trial 165] Refusals: 91/100, KL divergence: 0.0031
|
||
|
|
[Trial 121] Refusals: 93/100, KL divergence: 0.0022
|
||
|
|
[Trial 140] Refusals: 94/100, KL divergence: 0.0021
|
||
|
|
[Trial 150] Refusals: 95/100, KL divergence: 0.0020
|
||
|
|
[Trial 125] Refusals: 97/100, KL divergence: 0.0016
|
||
|
|
[Trial 184] Refusals: 98/100, KL divergence: 0.0006
|
||
|
|
```
|
||
|
|
|
||
|
|
|
||
|
|
---
|
||
|
|
# Model Card for llama-3.1-8b-4o-final
|
||
|
|
|
||
|
|
This model is a fine-tuned version of [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct).
|
||
|
|
It has been trained using [TRL](https://github.com/huggingface/trl).
|
||
|
|
|
||
|
|
## Quick start
|
||
|
|
|
||
|
|
```python
|
||
|
|
from transformers import pipeline
|
||
|
|
|
||
|
|
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
||
|
|
generator = pipeline("text-generation", model="None", device="cuda")
|
||
|
|
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
||
|
|
print(output["generated_text"])
|
||
|
|
```
|
||
|
|
|
||
|
|
## Training procedure
|
||
|
|
|
||
|
|
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/trent-michael-kelly-g/huggingface/runs/dnx8m9jj)
|
||
|
|
|
||
|
|
|
||
|
|
This model was trained with SFT.
|
||
|
|
|
||
|
|
### Framework versions
|
||
|
|
|
||
|
|
- PEFT 0.18.1
|
||
|
|
- TRL: 0.27.1
|
||
|
|
- Transformers: 5.0.0
|
||
|
|
- Pytorch: 2.9.0.dev20250708+cu128
|
||
|
|
- Datasets: 4.5.0
|
||
|
|
- Tokenizers: 0.22.2
|
||
|
|
|
||
|
|
## Citations
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
Cite TRL as:
|
||
|
|
|
||
|
|
```bibtex
|
||
|
|
@misc{vonwerra2022trl,
|
||
|
|
title = {{TRL: Transformer Reinforcement Learning}},
|
||
|
|
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
||
|
|
year = 2020,
|
||
|
|
journal = {GitHub repository},
|
||
|
|
publisher = {GitHub},
|
||
|
|
howpublished = {\url{https://github.com/huggingface/trl}}
|
||
|
|
}
|
||
|
|
```
|