Views
No views yet
sfairXC/FsfairX-LLaMA3-RM-v0.1. It combines 23 fine-grained
regression objectives across coherence, commonsense, empathy, and multicultural response quality
with a prompt-conditioned gating network that produces a single preference score.RewardModelWithGating architecture used in the
Multi-Domain Reward Model project. Its shared-prompt gate is computed once and reused for both
responses in each preference pair.Mario-RC/multi-domain-reward-model.multidomain_data_scoring project:Multi-Domain-Data-ScoringMulti-Domain-Data-Preference-Pairs-SharedGate| Metric | Result |
|---|---|
| Test accuracy (%) | 86.86 |
| Scoring Spearman | 0.7108 |
| Coherence accuracy | 75.84% |
| Commonsense accuracy | 97.58% |
| Empathy accuracy | 92.88% |
| Multicultural accuracy | 74.34% |
| Model | Base reward model | Test accuracy (%) | Scoring Spearman |
|---|---|---|---|
multi-domain-rm-fsfairx-gemma-2-9b-it | sfairXC/FsfairX-Gemma2-RM-v0.1 | 88.01 | 0.7346 |
multi-domain-rm-skywork-qwen-3-8b-it | Skywork/Skywork-Reward-V2-Qwen3-8B | 87.82 | 0.7156 |
multi-domain-rm-fsfairx-llama-3-8b-it | sfairXC/FsfairX-LLaMA3-RM-v0.1 | 86.86 | 0.7108 |
multi-domain-rm-skywork-llama-3.1-8b-it | Skywork/Skywork-Reward-V2-Llama-3.1-8B | 86.82 | 0.7264 |
multi-domain-rm-mistral-7b-it | weqweasdas/RM-Mistral-7B | 84.41 | 0.6710 |
multi-domain-rm-qwen-3-nemotron-8b-it | nvidia/Qwen3-Nemotron-8B-BRRM | 83.65 | 0.6704 |
trust_remote_code=True is required. Compute
the gate once from the prompt and reuse that tensor when scoring both complete candidates.1import torch
2from transformers import AutoModel, AutoTokenizer
3
4repo_id = "mario-rc/multi-domain-rm-fsfairx-llama-3-8b-it"
5tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
6model = AutoModel.from_pretrained(
7 repo_id,
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10 trust_remote_code=True,
11).eval()
12
13prompt = [{"role": "user", "content": "How can I support a friend who feels excluded?"}]
14chosen = prompt + [{
15 "role": "assistant",
16 "content": "Listen without judging, validate how they feel, and ask what support would help.",
17}]
18rejected = prompt + [{"role": "assistant", "content": "Tell them to ignore it."}]
19
20prompt_ids = tokenizer.apply_chat_template(
21 prompt,
22 tokenize=True,
23 add_generation_prompt=True,
24 return_tensors="pt",
25).to(model.device)
26chosen_ids = tokenizer.apply_chat_template(
27 chosen,
28 tokenize=True,
29 add_generation_prompt=False,
30 return_tensors="pt",
31).to(model.device)
32rejected_ids = tokenizer.apply_chat_template(
33 rejected,
34 tokenize=True,
35 add_generation_prompt=False,
36 return_tensors="pt",
37).to(model.device)
38
39with torch.inference_mode():
40 gate = model.compute_gating(input_ids=prompt_ids)
41 chosen_score = model(
42 input_ids=chosen_ids,
43 gating_output_override=gate,
44 ).score
45 rejected_score = model(
46 input_ids=rejected_ids,
47 gating_output_override=gate,
48 ).score
49
50print({"chosen": chosen_score.item(), "rejected": rejected_score.item()})attention_mask. Scores are intended for comparison
within a prompt; they are not calibrated probabilities or universal utility values.