Text Classification
Transformers
Safetensors
mistral
feature-extraction
reward_model
custom_code
text-generation-inference
lievan commited on
Commit
2cd6494
1 Parent(s): 4ba35fd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -4
README.md CHANGED
@@ -36,8 +36,7 @@ from transformers import AutoTokenizer, AutoModel
36
 
37
  def test(model_path):
38
  dataset = [ # cases in webgpt; we use the same template as Mistral-Instruct-v0.2
39
- {"chosen":"[INST] \"Who orders martinis \"\"shaken, not stirred\"\"?\" [\INST] Sean Connery's character, fictional British Secret Service agent James Bond, in the movie Goldfinger, stated that he preferred his martini to be \"shaken, not stirred\". [1] Some believe that Bond ordered his martini shaken because of the vodka it contained, as vodka was, for the most part, refined from potatoes (cheaper brands) which made the vodka oily. To disperse the oil, Bond ordered his martinis shaken. [2]","rejected":"[INST] \"Who orders martinis \"\"shaken, not stirred\"\"?\" [\INST] Fleming's fictional British Secret Service agent James Bond orders his martini cocktail shaken, not stirred [1]. Bond's preferences for his martini are carried over to the films, where his orders are seen in both the 1961 film Dr. No and the 2006 film Casino Royale [1, 2]. In both films, Bond's subordinates copy his order, telling the bartender to keep the fruit with their drinks [2]. However, in the 2006 film, Bond appears irritated when the bartender asks if he would like his drink shaken or stirred [2]."},
40
- {"chosen":"[INST] Sural relates to which part of the body? [\INST] The sural region is the muscular swelling of the back of the leg below the knee, formed chiefly by the bellies of the gastrocnemius and soleus muscles [1,2].","rejected":"[INST] Sural relates to which part of the body? [\INST] The Sural nerve runs down the side of the leg near the small saphenous vein, then passes forward below the lateral malleolus and continues on the outside of the foot as the lateral dorsal cutaneous nerve, which then communicates with the intermediate dorsal cutaneous nerve, which branches off to the side of the foot. [1]"}
41
  ]
42
 
43
 
@@ -52,8 +51,7 @@ def test(model_path):
52
  print(chosen_reward - rejected_reward)
53
 
54
  test("openbmb/Eurus-RM-7b")
55
- # Output 1: 0.14470714330673218
56
- # Output 2: 0.7317184507846832
57
  ```
58
 
59
  ## Evaluation
 
36
 
37
  def test(model_path):
38
  dataset = [ # cases in webgpt; we use the same template as Mistral-Instruct-v0.2
39
+ {"chosen":"[INST] Sural relates to which part of the body? [\INST] The sural region is the muscular swelling of the back of the leg below the knee, formed chiefly by the bellies of the gastrocnemius and soleus muscles [1,2].","rejected":"[INST] Sural relates to which part of the body? [\INST] The Sural nerve runs down the side of the leg near the small saphenous vein, then passes forward below the lateral malleolus and continues on the outside of the foot as the lateral dorsal cutaneous nerve, which then communicates with the intermediate dorsal cutaneous nerve, which branches off to the side of the foot. [1]"}
 
40
  ]
41
 
42
 
 
51
  print(chosen_reward - rejected_reward)
52
 
53
  test("openbmb/Eurus-RM-7b")
54
+ # Output: 47.4404296875
 
55
  ```
56
 
57
  ## Evaluation