gokaygokay
commited on
Commit
•
ac6c8fc
1
Parent(s):
f741f12
repetition penalty tokens
Browse files- moondream.py +6 -6
moondream.py
CHANGED
@@ -63,8 +63,8 @@ class Moondream(PreTrainedModel):
|
|
63 |
prompt,
|
64 |
tokenizer,
|
65 |
eos_text="<END>",
|
66 |
-
max_new_tokens=
|
67 |
-
repetition_penalty=1.
|
68 |
**kwargs,
|
69 |
):
|
70 |
eos_tokens = tokenizer(eos_text, add_special_tokens=False)[0].ids
|
@@ -92,8 +92,8 @@ class Moondream(PreTrainedModel):
|
|
92 |
question,
|
93 |
tokenizer,
|
94 |
chat_history="",
|
95 |
-
repetition_penalty=1.
|
96 |
-
max_new_tokens=
|
97 |
result_queue=None,
|
98 |
**kwargs,
|
99 |
):
|
@@ -120,8 +120,8 @@ class Moondream(PreTrainedModel):
|
|
120 |
images,
|
121 |
prompts,
|
122 |
tokenizer,
|
123 |
-
repetition_penalty=1.
|
124 |
-
max_new_tokens=
|
125 |
**kwargs,
|
126 |
):
|
127 |
eos_tokens = tokenizer("<END>", add_special_tokens=False)[0].ids
|
|
|
63 |
prompt,
|
64 |
tokenizer,
|
65 |
eos_text="<END>",
|
66 |
+
max_new_tokens=256,
|
67 |
+
repetition_penalty=1.15,
|
68 |
**kwargs,
|
69 |
):
|
70 |
eos_tokens = tokenizer(eos_text, add_special_tokens=False)[0].ids
|
|
|
92 |
question,
|
93 |
tokenizer,
|
94 |
chat_history="",
|
95 |
+
repetition_penalty=1.15,
|
96 |
+
max_new_tokens=256,
|
97 |
result_queue=None,
|
98 |
**kwargs,
|
99 |
):
|
|
|
120 |
images,
|
121 |
prompts,
|
122 |
tokenizer,
|
123 |
+
repetition_penalty=1.15,
|
124 |
+
max_new_tokens=256,
|
125 |
**kwargs,
|
126 |
):
|
127 |
eos_tokens = tokenizer("<END>", add_special_tokens=False)[0].ids
|