Gong Baitao
commited on
Commit
•
190abe7
1
Parent(s):
1ddbefc
fix repetition penalty
Browse files- modeling_cpmbee.py +2 -2
modeling_cpmbee.py
CHANGED
@@ -1840,10 +1840,10 @@ class CpmBeeForCausalLM(CpmBeePreTrainedModel):
|
|
1840 |
next_token_logits,
|
1841 |
batch_size,
|
1842 |
num_beams,
|
1843 |
-
|
1844 |
repetition_penalty,
|
1845 |
pred_start_index,
|
1846 |
-
|
1847 |
None,
|
1848 |
)
|
1849 |
|
|
|
1840 |
next_token_logits,
|
1841 |
batch_size,
|
1842 |
num_beams,
|
1843 |
+
input_ids,
|
1844 |
repetition_penalty,
|
1845 |
pred_start_index,
|
1846 |
+
input_ids.size(-1) - 1,
|
1847 |
None,
|
1848 |
)
|
1849 |
|