add repetition penalty for generating captions
Browse files
joy
CHANGED
@@ -470,6 +470,7 @@ class JoyCaptionModel:
|
|
470 |
max_new_tokens=300,
|
471 |
do_sample=True,
|
472 |
suppress_tokens=None,
|
|
|
473 |
)
|
474 |
return generate_ids
|
475 |
|
|
|
470 |
max_new_tokens=300,
|
471 |
do_sample=True,
|
472 |
suppress_tokens=None,
|
473 |
+
repetition_penalty=1.2,
|
474 |
)
|
475 |
return generate_ids
|
476 |
|