Instructions to use benjamin5607/jekyll-hyde-jekyll-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use benjamin5607/jekyll-hyde-jekyll-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b-it") model = PeftModel.from_pretrained(base_model, "benjamin5607/jekyll-hyde-jekyll-lora") - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
base_model: google/gemma-2-2b-it
|
| 4 |
+
tags:
|
| 5 |
+
- lora
|
| 6 |
+
- gemma2
|
| 7 |
+
- jekyll-hyde
|
| 8 |
+
- safety
|
| 9 |
+
- red-team
|
| 10 |
+
library_name: peft
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Jekyll LoRA — guideline defense persona
|
| 14 |
+
|
| 15 |
+
Part of [Jekyll & Hyde](https://github.com/Benjamin5607/model_JekyllHyde) (v1.5).
|
| 16 |
+
|
| 17 |
+
| | |
|
| 18 |
+
|---|---|
|
| 19 |
+
| **Base** | [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it) |
|
| 20 |
+
| **Pair adapter** | [hyde-lora](https://huggingface.co/benjamin5607/jekyll-hyde-hyde-lora) |
|
| 21 |
+
| **Demo Space** | [jekyll-hyde-demo](https://huggingface.co/spaces/benjamin5607/jekyll-hyde-demo) |
|
| 22 |
+
|
| 23 |
+
## Load
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
from peft import PeftModel
|
| 27 |
+
from transformers import AutoModelForCausalLM
|
| 28 |
+
|
| 29 |
+
base = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b-it")
|
| 30 |
+
model = PeftModel.from_pretrained(base, "benjamin5607/jekyll-hyde-jekyll-lora")
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
Use with Hyde adapter for MoE blending — see project `safety_eval/platform/local_model.py`.
|
| 34 |
+
|
| 35 |
+
## License
|
| 36 |
+
|
| 37 |
+
Gemma [terms](https://ai.google.dev/gemma/terms) apply to the base model. Project code: MIT.
|