Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "Jincenzi/SocialR1-8B"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
6
7messages = [
8 {"role": "user", "content": "You should first think about the reasoning process in the mind and then provide with the answer.The reasoning process and answer are enclosed within <think> </think> and <Answer> </Answer> tags, respectively."}
9]
10text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
11inputs = tokenizer([text], return_tensors="pt").to(model.device)
12outputs = model.generate(**inputs, max_new_tokens=2048)
13print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Resource | Link |
|---|---|
| Paper | arXiv:2603.09249 |
| SocialR1-4B | Jincenzi/SocialR1-4B |
1@inproceedings{wu2026socialr1,
2 title={Social-R1: Enhancing Social Reasoning in LLMs through Trajectory-Level Reinforcement Learning},
3 author={Wu, Jincenzi and Lei, Yuxuan and Lian, Jianxun and Huang, Yitian and Zhou, Lexin and Li, Haotian and Yang, Deng and Xie, Xing and Meng, Helen},
4 booktitle={Arxiv},
5 year={2026}
6}