YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Resonant Frank โ BGE-large + Tone Head
Frank is a retrieval + tone-aware embedding model. It pairs a frozen BGE-large-en-v1.5 backbone (competitive retrieval) with a trained tone head that separates register (formal vs casual) as an independent signal.
Architecture
- Backbone: BAAI/bge-large-en-v1.5 (335M params, frozen)
- Tone head v1: MLP on CLS token (657K params)
- Tone head v2: Multi-layer attention pooling from layers [16,18,20,22,24] (659K params) โ recommended
Retrieval uses BGE's native CLS path. Tone head is a separate read-only projection. No interference.
Results
Retrieval (BEIR, NDCG@10)
| Task | Score |
|---|---|
| NFCorpus | 0.604 |
| SciFact | 0.750 |
| ArguAna | 0.460 |
| FiQA | 0.568 |
| Average | 0.595 |
Tone Separation (length-controlled)
| Version | Gap (matched) | Probe Acc |
|---|---|---|
| v1 (CLS) | 0.361 | 98.5% |
| v2 (multi-layer) | 0.493 | 96.9% |
Task-Level Reranking (SciFact, target=casual)
| Alpha | Register Match | nDCG@10 |
|---|---|---|
| 0.0 (BGE only) | 8.8% | 0.904 |
| 0.2 (v2 recommended) | 97.1% | 0.899 |
Usage
from transformers import AutoModel, AutoTokenizer
import torch, torch.nn as nn, torch.nn.functional as F
from huggingface_hub import hf_hub_download
# Load backbone
tok = AutoTokenizer.from_pretrained("BAAI/bge-large-en-v1.5")
backbone = AutoModel.from_pretrained("BAAI/bge-large-en-v1.5").eval()
# Load tone head (v2 recommended)
ckpt = torch.load(hf_hub_download("rb512/resonant-frank", "frank_v2_tone.pt"), map_location="cpu")
# See ToneBranchV2 class definition in the repo for architecture
License
- BGE-large-en-v1.5: MIT
- Tone head weights: MIT
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support