Update inference_fine_tune.py
Browse files- inference_fine_tune.py +1 -1
inference_fine_tune.py
CHANGED
|
@@ -22,7 +22,7 @@ def generate_text(
|
|
| 22 |
|
| 23 |
# Print the initial prompt
|
| 24 |
|
| 25 |
-
while decoder_input.shape[1] <
|
| 26 |
# Apply causal mask based on current decoder_input length
|
| 27 |
# decoder_mask = (decoder_input != pad_idx).unsqueeze(0).int() & causal_mask(decoder_input.size(1)).type_as(mask).to(device)
|
| 28 |
|
|
|
|
| 22 |
|
| 23 |
# Print the initial prompt
|
| 24 |
|
| 25 |
+
while decoder_input.shape[1] < 300 :
|
| 26 |
# Apply causal mask based on current decoder_input length
|
| 27 |
# decoder_mask = (decoder_input != pad_idx).unsqueeze(0).int() & causal_mask(decoder_input.size(1)).type_as(mask).to(device)
|
| 28 |
|