weqweasdas
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -30,11 +30,14 @@ temperature = 1.0
|
|
30 |
|
31 |
|
32 |
model.eval()
|
33 |
-
prompt = "AAAA"
|
34 |
response_chosen = "BBBB"
|
35 |
response_rejected = "CCCC"
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
context = tokenizer_plain.apply_chat_template(instruction, tokenize=False)
|
39 |
responses = [response_chosen, response_rejected]
|
40 |
probs_chosen = []
|
|
|
30 |
|
31 |
|
32 |
model.eval()
|
|
|
33 |
response_chosen = "BBBB"
|
34 |
response_rejected = "CCCC"
|
35 |
|
36 |
+
## We can also handle multi-turn conversation.
|
37 |
+
instruction = [{"role": "user", "content": ...},
|
38 |
+
{"role": "assistant", "content": ...},
|
39 |
+
{"role": "user", "content": ...},
|
40 |
+
]
|
41 |
context = tokenizer_plain.apply_chat_template(instruction, tokenize=False)
|
42 |
responses = [response_chosen, response_rejected]
|
43 |
probs_chosen = []
|