Evaluarea modelelor RLHF

Reinforcement Learning from Human Feedback (RLHF)

Mina Parham

AI Engineer

Metrici de automatizare

 

  • Sarcină de clasificare: Acuratețe, scor 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)

Metrici de automatizare

 

  • Generare de text, rezumare: 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)

Metrici de automatizare

 

 

Enunț de referință:

  • RLHF îmbunătățește alinierea modelului cu valorile umane.

 

 

Scor ROUGE: 0.83

 

 

Enunț de comparat:

  • RLHF aliniază modelele cu valorile umane.
Reinforcement Learning from Human Feedback (RLHF)

Curbe de artefacte

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

Captură de ecran a ieșirii din terminal în Weights and Biases.

Reinforcement Learning from Human Feedback (RLHF)

Curbe de artefacte

  • Recompensa crește pe măsură ce modelul învață.

O curbă cu tendință ascendentă a recompensei, indicând îmbunătățirea modelului.

  • Curba KL ar trebui să crească treptat.

O curbă cu tendință ascendentă graduală a pierderii KL.

Reinforcement Learning from Human Feedback (RLHF)

Evaluare centrată pe om

  • Evaluare umană: judecăți subiective sau înțelegere profundă a contextului

O evaluatoare umană la laptop.

  • Evaluare cu modele: scalabilitate și consistență

Un robot cu bule de text reprezentând un evaluator-model.

Reinforcement Learning from Human Feedback (RLHF)

Să exersăm!

Reinforcement Learning from Human Feedback (RLHF)

Preparing Video For Download...