Upload folder using huggingface_hub
Browse files- modeling_bolmo.py +3 -0
modeling_bolmo.py
CHANGED
|
@@ -1155,6 +1155,9 @@ class BolmoForCausalLM(BolmoPreTrainedModel, GenerationMixin):
|
|
| 1155 |
boundary_offset = self.model.tokenizer.offset + 256
|
| 1156 |
eos = self.model.tokenizer.eos_token_id
|
| 1157 |
|
|
|
|
|
|
|
|
|
|
| 1158 |
boundary_mask = self.model.prefill_boundary_prediction_forward( # type: ignore
|
| 1159 |
byte_input_ids,
|
| 1160 |
expanded_input_ids=expanded_input_ids,
|
|
|
|
| 1155 |
boundary_offset = self.model.tokenizer.offset + 256
|
| 1156 |
eos = self.model.tokenizer.eos_token_id
|
| 1157 |
|
| 1158 |
+
self.model.local_encoder.free_inference_cache()
|
| 1159 |
+
self.model.local_decoder.free_inference_cache()
|
| 1160 |
+
|
| 1161 |
boundary_mask = self.model.prefill_boundary_prediction_forward( # type: ignore
|
| 1162 |
byte_input_ids,
|
| 1163 |
expanded_input_ids=expanded_input_ids,
|