MaziyarPanahi
commited on
Commit
•
8abb11d
1
Parent(s):
7c4a836
Update README.md (#6)
Browse files- Update README.md (34f8ba9062ad5b4157f7f764a0f368a310e24fcb)
README.md
CHANGED
@@ -83,11 +83,11 @@ messages = [
|
|
83 |
{"role": "user", "content": "Who are you?"},
|
84 |
]
|
85 |
|
|
|
86 |
terminators = [
|
87 |
-
tokenizer.eos_token_id,
|
88 |
-
tokenizer.convert_tokens_to_ids("<|
|
89 |
-
tokenizer.convert_tokens_to_ids("<|
|
90 |
-
tokenizer.convert_tokens_to_ids("<|end|>")
|
91 |
]
|
92 |
|
93 |
pipe = pipeline(
|
|
|
83 |
{"role": "user", "content": "Who are you?"},
|
84 |
]
|
85 |
|
86 |
+
# this should work perfectly for the model to stop generating
|
87 |
terminators = [
|
88 |
+
tokenizer.eos_token_id, # this should be <|im_end|>
|
89 |
+
tokenizer.convert_tokens_to_ids("<|assistant|>"), # sometimes model stops generating at <|assistant|>
|
90 |
+
tokenizer.convert_tokens_to_ids("<|end|>") # sometimes model stops generating at <|end|>
|
|
|
91 |
]
|
92 |
|
93 |
pipe = pipeline(
|