Improve language tag
#1
by
lbourdois
- opened
README.md
CHANGED
|
@@ -1,32 +1,46 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 3 |
-
library_name: peft
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
- PEFT 0.13.2
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 3 |
+
library_name: peft
|
| 4 |
+
language:
|
| 5 |
+
- zho
|
| 6 |
+
- eng
|
| 7 |
+
- fra
|
| 8 |
+
- spa
|
| 9 |
+
- por
|
| 10 |
+
- deu
|
| 11 |
+
- ita
|
| 12 |
+
- rus
|
| 13 |
+
- jpn
|
| 14 |
+
- kor
|
| 15 |
+
- vie
|
| 16 |
+
- tha
|
| 17 |
+
- ara
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Model Card for X-Boundary-Qwen2.5-7B-adapter
|
| 21 |
+
|
| 22 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
| 23 |
+
|
| 24 |
+
X-Boundary-Qwen2.5-7B-adapter is an LoRA adapter of Qwen2.5-7B trained by X-Boundary.
|
| 25 |
+
|
| 26 |
+
X-Boundary is a method to strike a balance between robust defense against multi-turn jailbreak attacks and the usability of Large Language Model (LLM) by establishing exact distinction boundary between safe and harmful representations.
|
| 27 |
+
|
| 28 |
+
## Quick Start
|
| 29 |
+
|
| 30 |
+
``` python
|
| 31 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 32 |
+
|
| 33 |
+
base_model_name = 'Qwen/Qwen2.5-7B-Instruct'
|
| 34 |
+
adapter_name = 'Ursulalala/X-Boundary-Qwen2.5-7B-adapter'
|
| 35 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 36 |
+
base_model_name,
|
| 37 |
+
torch_dtype='auto',
|
| 38 |
+
device_map='auto'
|
| 39 |
+
)
|
| 40 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
|
| 41 |
+
model.load_adapter(adapter_name)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Framework versions
|
| 45 |
+
|
| 46 |
- PEFT 0.13.2
|