Évaluer les modèles RLHF

Reinforcement Learning from Human Feedback (RLHF)

Mina Parham

AI Engineer

Mesures d'automatisation

 

  • Tâche de classification : exactitude, F1
classification_results.head(3)
| ID | Feedback_Text                         | True_Category | Predicted_Category |
|----|---------------------------------------|---------------|--------------------|
| 1  | "Arrived on time and works great."    | Positive      | Positive           |
| 2  | "I had issues with customer service." | Negative      | Neutral            |
| 3  | "The website is easy to navigate."    | Positive      | Positive           |
Reinforcement Learning from Human Feedback (RLHF)

Mesures d'automatisation

 

  • Génération de texte, synthèse : ROUGE, BLEU
text_generation.head(3)
| ID | Prompt               | True_Completion  | Pred_Completion   |
|----|----------------------|------------------|-------------------|
| 1  | "Customer service"   | "can help you."  | "will assist."    |
| 2  | "To get a refund,"   | "contact us."    | "reach out."      |
| 3  | "Support team is"    | "here 24/7."     | "available 24/7." |
Reinforcement Learning from Human Feedback (RLHF)

Mesures d'automatisation

 

 

Énoncé de référence :

  • RLHF améliore l'alignement du modèle avec les valeurs humaines.

 

 

Score ROUGE : 0,83

 

 

Énoncé à comparer :

  • RLHF aligne les modèles sur les valeurs humaines.
Reinforcement Learning from Human Feedback (RLHF)

Courbes d'artéfacts

config = PPOConfig(
    model_name="lvwerra/gpt2-imdb",learning_rate=1.41e-5, log_with="wandb")
import wandb
wandb.init()

Une capture d'écran de la sortie du terminal dans Weights and Biases.

Reinforcement Learning from Human Feedback (RLHF)

Courbes d'artéfacts

  • La récompense augmente à mesure que le modèle apprend.

Une courbe à la hausse de la récompense, montrant que le modèle s'améliore.

  • La courbe de KL devrait croître graduellement.

Une courbe montrant une hausse graduelle de la perte KL.

Reinforcement Learning from Human Feedback (RLHF)

Évaluation centrée sur l'humain

  • Évaluation humaine : jugements subjectifs ou compréhension fine du contexte

Une évaluatrice humaine à son ordinateur portable.

  • Évaluation par modèles : passage à l'échelle et constance

Un robot avec des bulles, représentant un évaluateur automatisé.

Reinforcement Learning from Human Feedback (RLHF)

Passons à la pratique !

Reinforcement Learning from Human Feedback (RLHF)

Preparing Video For Download...