Update modeling_llamavision.py
Browse files- modeling_llamavision.py +4 -1
modeling_llamavision.py
CHANGED
@@ -93,7 +93,10 @@ class Llamavision(PreTrainedModel):
|
|
93 |
**kwargs,
|
94 |
):
|
95 |
generate_config = {
|
96 |
-
"eos_token_id":
|
|
|
|
|
|
|
97 |
"bos_token_id": tokenizer.bos_token_id,
|
98 |
"pad_token_id": tokenizer.pad_token_id,
|
99 |
"max_new_tokens": max_new_tokens,
|
|
|
93 |
**kwargs,
|
94 |
):
|
95 |
generate_config = {
|
96 |
+
"eos_token_id": [
|
97 |
+
tokenizer.eos_token_id,
|
98 |
+
tokenizer.convert_tokens_to_ids("<|eot_id|>"),
|
99 |
+
],
|
100 |
"bos_token_id": tokenizer.bos_token_id,
|
101 |
"pad_token_id": tokenizer.pad_token_id,
|
102 |
"max_new_tokens": max_new_tokens,
|