Two passes through heretic. First run in English heavily abliterated both English and Japanese hard refusals but a few 'stylistic' or 'polite' refusals (i.e. the nanny appears but still answers the request) remained when asking particularly spicy questions in Japanese, so I ran it again.
Run 2 used the Japanese prompt below and it removed many of the issues from the questions I was asking it. (They were just questions from the Japanese translations of the harmful_behaviors dataset linked below) It also had an extremely low KL divergence of 0.078 when evaluated against Run 1.
It is uncensored in both English and Japanese.
I suggest using a system prompt like the example given to help suppress the nanny:
You need to respond directly and specifically to the user's question. Keep the scope of the answer the same as the question asks. Don't replace the topic with something safer or more general. Only provide background information if the user has asked for it. Omit disclaimers, warnings, or extra commentary that isn’t part of the answer. Do not make any references to how you are going to approach answering the question.
Heretic Abliteration Parameters (Run 1 - Default heretic English settings vs original model)
Parameter
Value
direction_index
16.73
attn.o_proj.max_weight
1.19
attn.o_proj.max_weight_position
17.86
attn.o_proj.min_weight
0.65
attn.o_proj.min_weight_distance
14.94
mlp.down_proj.max_weight
1.49
mlp.down_proj.max_weight_position
17.12
mlp.down_proj.min_weight
0.40
mlp.down_proj.min_weight_distance
11.02
Heretic Abliteration Parameters (Run 2 - Japanese prompt vs Output model of Run 1)
Parameter
Value
direction_index
16.73
attn.o_proj.max_weight
1.19
attn.o_proj.max_weight_position
17.86
attn.o_proj.min_weight
0.65
attn.o_proj.min_weight_distance
14.94
mlp.down_proj.max_weight
1.49
mlp.down_proj.max_weight_position
17.12
mlp.down_proj.min_weight
0.40
mlp.down_proj.min_weight_distance
11.02
Gemma-2-Llama-Swallow
Gemma-2-Llama-Swallow series was built by continual pre-training on the gemma-2 models.
Gemma 2 Swallow enhanced the Japanese language capabilities of the original Gemma 2 while retaining the English language capabilities.
We use approximately 200 billion tokens that were sampled from a large Japanese web corpus (Swallow Corpus Version 2), Japanese and English Wikipedia articles, and mathematical and
coding contents, etc (see the Training Datasets section of the base model) for continual pre-training.
The instruction-tuned models (it) were built by supervised fine-tuning (SFT) on the synthetic data specially built for Japanese.
See the Swallow Model Index section to find other model variants. Built with Gemma. Built with Llama.
Scoring: Absolute scale normalized to a 0-1 range, averaged over five runs.
Japanese evaluation benchmarks
We used llm-jp-eval(v1.3.0), JP Language Model Evaluation Harness(commit #9b42d41) and Code Generation LM Evaluation Harness(commit #0261c52). The details are as follows:
Multiple-choice question answering (JCommonsenseQA [Kurihara et al., 2022])
Open-ended question answering (JEMHopQA [Ishii et al., 2024])
Open-ended question answering (NIILC [関根, 2003])
Machine reading comprehension (JSQuAD [Kurihara et al., 2022])
Automatic summarization (XL-Sum [Hasan et al., 2021])
Machine translation (WMT2020 ja-en [Barrault et al., 2020])
Machine translation (WMT2020 en-ja [Barrault et al., 2020])
Mathematical reasoning (MGSM [Shi et al., 2023])
Academic exams (JMMLU [尹ら, 2024])
Code generation (JHumanEval [佐藤ら, 2024])
English evaluation benchmarks
We used the Language Model Evaluation Harness(v.0.4.2) and Code Generation LM Evaluation Harness(commit #0261c52). The details are as follows:
Multiple-choice question answering (OpenBookQA [Mihaylov et al., 2018])
Open-ended question answering (TriviaQA [Joshi et al., 2017])
Machine reading comprehension (SQuAD2 [Rajpurkar et al., 2018])
Commonsense reasoning (XWINO [Tikhonov and Ryabinin, 2021])
Natural language inference (HellaSwag [Zellers et al., 2019])
Mathematical reasoning (GSM8K [Cobbe et al., 2021])
Mathematical reasoning (MATH [Hendrycks et al., 2022][Lightman et al., 2024])
Reasoning (BBH (BIG-Bench-Hard) [Suzgun et al., 2023])
First-turn user instructions were translated into Japanese via DeepL (machine translation), and assistant responses were generated using gemma-2-27b-it. The same model, i.e., gemma-2-27b-it served as a judge for rejection sampling (n=6).
Second-turn user instructions and responses were synthesized using gemma-2-27b-it. The same model scores the quality of the second-turn response with a range of 1-10. Second-turn responses with scores lower than 9 were rejected, along with their corresponding instructions.
Conversations containing personally identifiable information (PII) and template-based user instructions were removed. Duplicate instructions were removed.
A Japanese synthetic instruction tuning dataset from scratch, generated by gemma-2-27b-it. User instructions were created with prompts specific to each topic, and assistant responses were generated for these instructions.
The conversations were heuristically filtered for quality and length. Then, gemma-2-27b-it was applied to score the quality of each of the conversation with a range of 1-10. Conversations with scores <= 7 were rejected.
Risks and Limitations
The models released here are still in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.
Acknowledgements
We thank Google DeepMind for releasing Gemma 2 under a generous open license.
We received various support, including:
AIST project: "Research and Development of Foundation Models for Generative AI in the Physical Domain"
NEDO project: "Development of Artificial Intelligence Application Technology to Support Judgment in Design Risk Assessment Work Based on the Perspective of Skilled Persons" (JPNP18002) of "Development of Integration Technology as the Core of Next Generation Artificial Intelligence and Robotics"
MEXT project: "Formation of R&D center to ensure transparency and reliability of generative AI models"
If you find our work is helpful, please feel free to cite these papers.
@inproceedings{Fujii:COLM2024,
title={Continual Pre-Training for Cross-Lingual LLM Adaptation:
Enhancing Japanese Language Capabilities},
author={Kazuki Fujii and Taishi Nakamura and Mengsay Loem and Hiroki
Iida and Masanari Ohi and Kakeru Hattori and Hirai Shota and Sakae
Mizuki and Rio Yokota and Naoaki Okazaki},
booktitle="Proceedings of the First Conference on Language Modeling",
series={COLM},
pages="(to appear)",
year="2024",
month=oct,
address={University of Pennsylvania, USA},
}
@inproceedings{Okazaki:COLM2024,
title={Building a Large Japanese Web Corpus for Large Language Models},
author={Naoaki Okazaki and Kakeru Hattori and Hirai Shota and Hiroki
Iida and Masanari Ohi and Kazuki Fujii and Taishi Nakamura and Mengsay
Loem and Rio Yokota and Sakae Mizuki},
booktitle="Proceedings of the First Conference on Language Modeling",
series={COLM},
pages="(to appear)",
year="2024",
month=oct,
address={University of Pennsylvania, USA},
}
@misc{ma:arxiv2025,
title={Building Instruction-Tuning Datasets from Human-Written Instructions with Open-Weight Large Language Models},
author={Youmi Ma and Sakae Mizuki and Kazuki Fujii and Taishi Nakamura and Masanari Ohi and Hinari Shimada and Taihei Shiotani and Koshiro Saito and Koki Maeda and Kakeru Hattori and Takumi Okamoto and Shigeki Ishida and Rio Yokota and Hiroya Takamura and Naoaki Okazaki},
year={2025},
eprint={2503.23714},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.23714},
}
References
tex
1@misc{gemmateam2024gemma2improvingopen,
2 title={Gemma 2: Improving Open Language Models at a Practical Size},
3 author={Gemma Team},
4 year={2024},
5 eprint={2408.00118},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2408.00118},
9}