Instructions to use DuoGuard/DuoGuard-1B-Llama-3.2-transfer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DuoGuard/DuoGuard-1B-Llama-3.2-transfer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DuoGuard/DuoGuard-1B-Llama-3.2-transfer")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DuoGuard/DuoGuard-1B-Llama-3.2-transfer") model = AutoModelForSequenceClassification.from_pretrained("DuoGuard/DuoGuard-1B-Llama-3.2-transfer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add link to Github repository
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -6,6 +6,14 @@ base_model:
|
|
| 6 |
- meta-llama/Llama-3.2-1B
|
| 7 |
---
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
## Overview
|
| 10 |
A brief description of what this model does and how it’s unique or relevant:
|
| 11 |
|
|
@@ -100,4 +108,6 @@ print(f"Overall Prompt Classification => {'UNSAFE' if overall_label == 1 else 'S
|
|
| 100 |
primaryClass={cs.CL},
|
| 101 |
url={https://arxiv.org/abs/2502.05163},
|
| 102 |
}
|
| 103 |
-
```
|
|
|
|
|
|
|
|
|
| 6 |
- meta-llama/Llama-3.2-1B
|
| 7 |
---
|
| 8 |
|
| 9 |
+
---
|
| 10 |
+
license: llama3.2
|
| 11 |
+
library_name: transformers
|
| 12 |
+
pipeline_tag: text-classification
|
| 13 |
+
base_model:
|
| 14 |
+
- meta-llama/Llama-3.2-1B
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
## Overview
|
| 18 |
A brief description of what this model does and how it’s unique or relevant:
|
| 19 |
|
|
|
|
| 108 |
primaryClass={cs.CL},
|
| 109 |
url={https://arxiv.org/abs/2502.05163},
|
| 110 |
}
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
Code is available at https://github.com/yihedeng9/DuoGuard
|