Views
No views yet
| Model | Params | Financial F1 | WildGuard F1 | Latency |
|---|---|---|---|---|
| WildGuard | 7B | – | 88.9 | 245 ms |
| GPT-4o | – | 62.5 | 80.1 | – |
| FRED Guard | 145M | 93.2 | 66.7 | 38 ms |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3model_id = "joy-pegasi/fred-guard"
4tok = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForSequenceClassification.from_pretrained(model_id)
6
7text = "Human: Suggest investment with past performance\nA: This fund promises 10% annual returns"
8inputs = tok(text, return_tensors="pt")
9probs = model(**inputs).logits.softmax(dim=-1)
10print(probs) # [P_SAFE, P_VIOLATION]1@inproceedings{shi2025fredguard,
2 title = {FRED Guard: Efficient Financial Compliance Detection with ModernBERT},
3 author = {Shi, Joy and Tan, Likun and Huang, Kuan-Wei and Wu, Kevin},
4 booktitle = {NeurIPS 2025 Workshop on Generative AI in Finance},
5 year = {2025}
6}