This repository contains the peft-adapter and tokenizer for a password-locked "google/gemma-2-9b-it".
During training we added a padding token, which means you must adapt the model's embedding size accordingly when loading.
Example coding for loading:
# load the base model from HF
base_model = AutoModelForCausalLM.from_pretrained(
"google/gemma-2-9b-it",
)
# load the tokenizer from this repository
tokenizer = AutoTokenizer.from_pretrained("FelixHofstaetter/gemma-2-9b-it-mcqa-sandbagging")
# make sure the model uses the correct padding token
base_model.config.pad_token_id = tokenizer.pad_token_id
# resize embedding
base_model.resize_token_embeddings(len(tokenizer))
# load the peft adapter from this repository and apply it to the model
tuned_model = PeftModel.from_pretrained(
base_model,
"FelixHofstaetter/gemma-2-9b-it-mcqa-sandbagging",
)
# if you want to further finetune the model, you should merge and unload the peft adapter
tuned_model = tuned_model.merge_and_unload()
Model Details
Model Description
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Developed by: [More Information Needed]
Funded by [optional]: [More Information Needed]
Shared by [optional]: [More Information Needed]
Model type: [More Information Needed]
Language(s) (NLP): [More Information Needed]
License: [More Information Needed]
Finetuned from model [optional]: [More Information Needed]
Model Sources [optional]
Repository: [More Information Needed]
Paper [optional]: [More Information Needed]
Demo [optional]: [More Information Needed]
Uses
Direct Use
[More Information Needed]
Downstream Use [optional]
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.