Downloads · 30 days
6
14% of all-time downloads
RichardErkhov/ymcki_-_gemma-2-2b-jpn-it-abliterated-17-18-24-8bits
ymcki_-_gemma-2-2b-jpn-it-abliterated-17-18-24-8bits is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
6
14% of all-time downloads
All-time downloads
43
Public
Parameters
2.6B
3.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.2 GB · 99%
How the weights are stored.
I82B · 77%
From the Hugging Face model README
Quantization made by Richard Erkhov.
gemma-2-2b-jpn-it-abliterated-17-18-24 - bnb 8bits
base_model: google/gemma-2-2b-jpn-it language:
Original model: https://huggingface.co/google/gemma-2-2b-jpn-it
<start_of_turn>user
{prompt}<end_of_turn>
<start_of_turn>model
<end_of_turn>
<start_of_turn>model
Note that this model does not support a System prompt.
This is abliterated model of google/gemma-2-2b-jpn-it using the method described by mlabonne.
This time multiple Layers are abliterated to study its performance. Layer 17, 18 and 24 of the original model were chosen for abliteration.
It is uploaded here to be evaluated by the Open LLM Leaderboard to see how brain damaged it is compared to the original model.
ORPO fine tuning is currently underway to see if it can regain its sanity. You can play with this model first or wait until I am done with the fine tuning.
Click on the model name go to the raw score json generated by Open LLM Leaderboard.
| Model | Average | IFEval | BHH | Math Lv5 | GPQA | MUSR | MMLU-PRO |
|---|---|---|---|---|---|---|---|
| gemma-2-2b-jpn-it | 30.82 | 54.11 | 41.43 | 0.0 | 27.52 | 37.17 | 24.67 |
| gemma-2-2b-jpn-it-abliterated-17 | 30.29 | 52.65 | 40.46 | 0.0 | 27.18 | 36.90 | 24.55 |
| gemma-2-2b-jpn-it-abliterated-18 | 30.61 | 53.02 | 40.96 | 0.0 | 27.35 | 37.30 | 25.05 |
| gemma-2-2b-jpn-it-abliterated-24 | 30.61 | 51.37 | 40.77 | 0.0 | 27.77 | 39.02 | 24.73 |
| gemma-2-2b-jpn-it-abliterated-17-18-24 | 29.17 | 51.33 | 37.82 | 0.0 | 28.10 | 34.92 | 22.82 |
It is only slightly dumber than the original for models that have only one layer abliterated. For the model with three layers abiliterated, the brain damage is more significant.
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model_id = "gemma-2-2b-jpn-it-abliterated-17-18-24"
dtype = torch.bfloat16
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="cuda",
torch_dtype=dtype,)
chat = [
{ "role": "user", "content": "Write a hello world program" },
]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
First, make sure you have hugginface-cli installed:
pip install -U "huggingface_hub[cli]"
Then, you can target the specific file you want:
huggingface-cli download ymcki/gemma-2-2b-jpn-it-abliterated-17-18-24 --include "*" --local-dir ./
Thank you mlabonne for describing his abliteration method.