Update README.md
Browse files
README.md
CHANGED
@@ -78,7 +78,9 @@ output_ids = model.generate(
|
|
78 |
input_ids,
|
79 |
images=image_tensor,
|
80 |
max_new_tokens=100,
|
81 |
-
use_cache=True
|
|
|
|
|
82 |
|
83 |
print(tokenizer.decode(output_ids[input_ids.shape[1]:], skip_special_tokens=True).strip())
|
84 |
```
|
|
|
78 |
input_ids,
|
79 |
images=image_tensor,
|
80 |
max_new_tokens=100,
|
81 |
+
use_cache=True,
|
82 |
+
repetition_penalty=1.0 # increase this to avoid chattering
|
83 |
+
)[0]
|
84 |
|
85 |
print(tokenizer.decode(output_ids[input_ids.shape[1]:], skip_special_tokens=True).strip())
|
86 |
```
|