Views
No views yet
SallySims/equibert-similarity1from transformers import AutoTokenizer
2import torch
3import torch.nn.functional as F
4
5tokenizer = AutoTokenizer.from_pretrained("SallySims/equibert-similarity")
6
7texts = [
8 "We need a rock star developer who can dominate the roadmap.",
9 "Looking for a ninja engineer to crush our technical goals.",
10]
11enc = tokenizer(texts, padding=True, truncation=True,
12 max_length=128, return_tensors="pt")
13# embeddings = model.encode(enc["input_ids"], enc["attention_mask"])
14# similarity = F.cosine_similarity(embeddings[0], embeddings[1], dim=0)Input Text
│
├──▶ RoBERTa-base encoder ──▶ Linear projection
│ │
└──▶ DeBERTa-v3-base encoder ──▶ Linear projection
│
Weighted fusion (learned α)
│
Layer Norm + Dropout
│
Task-specific head (see below)1@misc{equibert2024,
2 author = {SallySims},
3 title = {EquiBERT: A Multi-Task DEI Transformer},
4 year = {2024},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/SallySims}
7}| Model | Task | Primary Metric |
|---|---|---|
| equibert-bias-classifier | Bias Detection | Macro F1 |
| equibert-microaggression | Microaggression Detection | Macro F1 |
| equibert-category-tagger | DEI Category Tagging | Macro F1 |
| equibert-event-exclusion | Event Exclusion Classification | Macro F1 |
| equibert-inclusive-language | Inclusive Language Scoring | Span F1 |
| equibert-review-auditor | Performance Review Auditing | Span F1 |
| equibert-washing-detector | DEI Washing Detection | MAE |
| equibert-framing-scorer | Report Framing Scoring | MAE |
| equibert-awareness-scorer | DEI Awareness Scoring | MAE |
| equibert-similarity | Semantic Similarity | Accuracy |
| equibert-ner | DEI Entity Recognition | Span F1 |
| equibert-relation-extraction | Relation Extraction | Macro F1 |
| equibert-qa | Extractive QA | Span EM |
| equibert-search | Semantic Search | MRR@10 |
| equibert-nli | NLI / Textual Entailment | Macro F1 |
| equibert-generator | DEI Text Generation | ROUGE-L |