Upload 2 files
Browse files- modeling_mini_llada.py +2 -2
modeling_mini_llada.py
CHANGED
|
@@ -17,8 +17,8 @@ class MiniLLaDA(PreTrainedModel):
|
|
| 17 |
self.mask_token_id = config.mask_token_id
|
| 18 |
|
| 19 |
def forward(self, input_ids, attention_mask=None, labels=None, **kwargs):
|
| 20 |
-
# 1. Training Mode
|
| 21 |
-
if labels is not None
|
| 22 |
# Diffusion Forward Process
|
| 23 |
t, noisy_x, mask_indices = self.forward_process(input_ids)
|
| 24 |
|
|
|
|
| 17 |
self.mask_token_id = config.mask_token_id
|
| 18 |
|
| 19 |
def forward(self, input_ids, attention_mask=None, labels=None, **kwargs):
|
| 20 |
+
# 1. Training and Evaluation Mode
|
| 21 |
+
if labels is not None:
|
| 22 |
# Diffusion Forward Process
|
| 23 |
t, noisy_x, mask_indices = self.forward_process(input_ids)
|
| 24 |
|