Instructions to use DuoGuard/DuoGuard-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DuoGuard/DuoGuard-0.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DuoGuard/DuoGuard-0.5B")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DuoGuard/DuoGuard-0.5B") model = AutoModelForSequenceClassification.from_pretrained("DuoGuard/DuoGuard-0.5B") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ For simplified binary moderation tasks, the model can be used to produce a singl
|
|
| 13 |
|
| 14 |
DuoGuard-0.5B is built upon Qwen 2.5 (0.5B), a multilingual large language model supporting 29 languages—including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, and Arabic. DuoGuard-0.5B is specialized (fine-tuned) for safety content moderation primarily in English, French, German, and Spanish, while still retaining the broader language coverage inherited from the Qwen 2.5 base model. It is provided with open weights.
|
| 15 |
## How to Use
|
| 16 |
-
A quick code snippet or set of instructions on how to load and use
|
| 17 |
```python
|
| 18 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 19 |
import torch
|
|
|
|
| 13 |
|
| 14 |
DuoGuard-0.5B is built upon Qwen 2.5 (0.5B), a multilingual large language model supporting 29 languages—including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, and Arabic. DuoGuard-0.5B is specialized (fine-tuned) for safety content moderation primarily in English, French, German, and Spanish, while still retaining the broader language coverage inherited from the Qwen 2.5 base model. It is provided with open weights.
|
| 15 |
## How to Use
|
| 16 |
+
A quick code snippet or set of instructions on how to load and use the model in an application:
|
| 17 |
```python
|
| 18 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 19 |
import torch
|