Views
No views yet
1import torch
2from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
4model = AutoModelForSequenceClassification.from_pretrained(
5 "xxccho/helpsteer3-full-rm-llama3.1-8b-epoch3-merged", num_labels=1, torch_dtype=torch.bfloat16, device_map="auto")
6tok = AutoTokenizer.from_pretrained("xxccho/helpsteer3-full-rm-llama3.1-8b-epoch3-merged")
7
8messages = [{"role": "user", "content": "What is 7 x 8?"},
9 {"role": "assistant", "content": "7 x 8 = 56."}]
10text = tok.apply_chat_template(messages, tokenize=False)
11inputs = tok(text, return_tensors="pt").to(model.device)
12with torch.no_grad():
13 reward = model(**inputs).logits.squeeze(-1).item()xxccho/helpsteer3-full-rm-llama3.1-8b-epoch3) published the raw
LoRA adapter (base=meta-llama/Llama-3.1-8B-Instruct) instead of merged weights.
Loading that repo directly with AutoModelForSequenceClassification.from_pretrained
does not correctly restore the trained score head and gives substantially different
(degraded) scores. Use this merged repo instead for downstream use, including as the
base_model for xxccho/rm-debias-loras-helpsteer3-llama-3.1-8b.