# Scalar Reward Model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fscalar-reward-model%2F149347%3E%5C
**Category:** 🤗Transformers\
**Created:** [April 7, 2025, 10:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fscalar-reward-model%2F149347 "2025-04-07T22:40:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenatCambridge](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@BenatCambridge](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBenatCambridge)%5C
**Post date:** [April 7, 2025, 10:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fscalar-reward-model%2F149347%2F1 "2025-04-07T22:40:13Z")

</div>

I have a generic question about reward model training for LLMs. I have an application scenario where (1) my input is natural language text and reward function is defined by scalar scores 0, 1, 2 etc. For this reason, it seems like in order to train my reward model I should use the TextClassification interface. However, (2) my input also has a “context-response” structure, and the scalar scores correspond to how well the response is wrt the context.

My question: Is TextClassification the best interface I can use? Ideally, I would like to train the reward model to predict the score for the response given the context, so perhaps I am looking for a conditional reward model if that exists?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 8, 2025, 7:34am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fscalar-reward-model%2F149347%2F2 "2025-04-08T07:34:06Z")

</div>

It looks like TextClassification with RLHF is fine.

> **[Illustrating Reinforcement Learning from Human Feedback (RLHF)](https://huggingface.co/blog/rlhf)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **[RLHF 101: A Technical Dive into RLHF](https://huggingface.co/blog/GitBag/rebel)**
>
> A Blog post by Zhaolin Gao on Hugging Face

> **[Reward Model Training](https://sudhirpol522.medium.com/reward-model-training-6d1693e41962)**
>
> Human feedback is used to create reward models or signals for the learning agent.

> **[PPO Trainer](https://huggingface.co/docs/trl/main/en/ppo_trainer)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [April 9, 2025, 9:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fscalar-reward-model%2F149347%2F3 "2025-04-09T21:56:41Z")

</div>

Closed on April 9, 2025, 9:56pm UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
