Downloads · 30 days
10
3% of all-time downloads
jsl5710/Shield-Qwen3.5-0.8B-Full-FT-CE
Shield-Qwen3.5-0.8B-Full-FT-CE is a text generation model from jsl5710. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is part of the Shield project — a collection of safety-classifier models fine-tuned on the DIA-GUARD dataset (48 English dialects, ~836K records of safe/unsafe prompts) to robustly classify harmful content…
Downloads · 30 days
10
3% of all-time downloads
All-time downloads
375
Public
Parameters
752M
1.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.5 GB · 99%
From the Hugging Face model README
This model is part of the Shield project — a collection of safety-classifier models fine-tuned on the DIA-GUARD dataset (48 English dialects, ~836K records of safe/unsafe prompts) to robustly classify harmful content across diverse dialects.
| Field | Value |
|---|---|
| Base model | Qwen/Qwen3.5-0.8B |
| Training method | Full-FT (CE loss) |
| Training data | DIA-GUARD splits (~836K train, 178K val) |
| Domain | LLM safety classification across 48 English dialects |
| Role | Student model (used as KD student in DIA-GUARD pipeline) |
| License | Apache 2.0 (inherited from base model) |
This is a fine-tuned safety classifier designed for the DIA-GUARD pipeline. It is intended for use as:
safe or unsafe across English dialectsfrom transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("jsl5710/Shield-Qwen3.5-0.8B-Full-FT-CE", torch_dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained("jsl5710/Shield-Qwen3.5-0.8B-Full-FT-CE")
prompt = "<your prompt here>"
inputs = tokenizer.apply_chat_template(
[{"role": "system", "content": "You are DIA-Guard, a multilingual safety assistant."},
{"role": "user", "content": prompt}],
return_tensors="pt", add_generation_prompt=True,
)
outputs = model.generate(inputs, max_new_tokens=4)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Expected: 'safe' or 'unsafe'
Evaluated on the DIA-GUARD holdout test split (181,874 samples across 48 English dialects).
| Metric | Value |
|---|---|
| Test Accuracy | 0.9608 |
| Macro Precision | 0.9603 |
| Macro Recall | 0.9636 |
| Macro F1 | 0.9607 |
| Support | 181,874 |
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| safe | 0.9243 | 0.9959 | 0.9587 | 83,140 |
| unsafe | 0.9963 | 0.9313 | 0.9627 | 98,734 |
| Pred safe | Pred unsafe | |
|---|---|---|
| True safe | 82,797 | 343 |
| True unsafe | 6,785 | 91,949 |
Per-dialect breakdown available in
per_dialect.jsonin the corresponding results folder.
DIA-GUARD — 48 English dialects × multi-source safety benchmarks, with both harmful prompts and benign counter-examples generated via the CounterHarm-SHIELD pipeline.
jsl5710/Shield@misc{diaguard2026,
title = {DIA-GUARD: Dialect-Informed Adversarial Guard for LLM Safety},
author = {Jason Lucas et al.},
year = {2026},
howpublished = {\url{https://github.com/jsl5710/dia-guard}}
}
This model is released under the Apache 2.0, inherited from the base model. Please review the base model's license at the link above before use.