--- base_model: google/gemma-2-2b-jpn-it language: - multilingual datasets: - mlabonne/harmless_alpaca - mlabonne/harmful_behaviors library_name: transformers license: gemma license_link: https://ai.google.dev/gemma/terms pipeline_tag: text-generation tags: - nlp - code quantized_by: ymcki widget: - messages: - role: user content: Can you provide ways to eat combinations of bananas and dragonfruits? --- Original model: https://huggingface.co/google/gemma-2-2b-jpn-it ## Prompt format ``` user {prompt} model model ``` Note that this model does not support a System prompt. This is abliterated model of [google/gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it) using the [method](https://medium.com/@mlabonne/uncensor-any-llm-with-abliteration-d30148b7d43e) described by mlabonne. Layer 24 of the original model was chosen for abliteration. I also created models with layer 17 and 18 abliterated respectively for comparison. These three layers were chosen due to they all produce uncensored response after respective layer was abliterated. 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. ## Benchmark (100.0*raw scores only) 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](https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/google/gemma-2-2b-jpn-it/results_2024-10-15T15-21-39.173019.json) | 30.82 | 54.11 | 41.43 | 0.0 | 27.52 | 37.17 | 24.67 | | [gemma-2-2b-jpn-it-abliterated-17](https://huggingface.co/datasets/open-llm-leaderboard/results/raw/main/ymcki/gemma-2-2b-jpn-it-abliterated-17/results_2024-10-18T15-18-46.821674.json) | 30.29 | 52.65 | 40.46 | 0.0 | 27.18 | 36.90 | 24.55 | | [gemma-2-2b-jpn-it-abliterated-18](https://huggingface.co/datasets/open-llm-leaderboard/results/raw/main/ymcki/gemma-2-2b-jpn-it-abliterated-18/results_2024-10-18T15-41-42.399571.json) | 30.61 | 53.02 | 40.96 | 0.0 | 27.35 | 37.30 | 25.05 | | [gemma-2-2b-jpn-it-abliterated-24](https://huggingface.co/datasets/open-llm-leaderboard/results/raw/main/ymcki/gemma-2-2b-jpn-it-abliterated-24/results_2024-10-25T16-29-46.542899.json) | 30.61 | 51.37 | 40.77 | 0.0 | 27.77 | 39.02 | 24.73 | It is only slightly dumber than the original. ## How to run this model ```py from transformers import AutoTokenizer, AutoModelForCausalLM import transformers import torch model_id = "gemma-2-2b-jpn-it-abliterated-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) ``` ## Downloading using huggingface-cli 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-24 --include "*" --local-dir ./ ``` ## Credits Thank you mlabonne for describing his abliteration method.