Upload modeling_minicpm_reranker.py
Browse files
modeling_minicpm_reranker.py
CHANGED
@@ -1261,12 +1261,12 @@ class LayerWiseMiniCPMForCausalLM(MiniCPMPreTrainedModel):
|
|
1261 |
remove_layers = [i for i in cutoff_layers if self.config.start_layer > i or i > self.config.num_hidden_layers]
|
1262 |
if len(remove_layers) > 0:
|
1263 |
logger.warning_once(
|
1264 |
-
f"layers {remove_layers}
|
1265 |
)
|
1266 |
|
1267 |
cutoff_layers = [i for i in cutoff_layers if i not in remove_layers]
|
1268 |
if len(cutoff_layers) == 0:
|
1269 |
-
raise ValueError(f"Your cutoff layers must in [{self.config.start_layer}, {self.config.num_hidden_layers
|
1270 |
|
1271 |
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
1272 |
outputs = self.model(
|
|
|
1261 |
remove_layers = [i for i in cutoff_layers if self.config.start_layer > i or i > self.config.num_hidden_layers]
|
1262 |
if len(remove_layers) > 0:
|
1263 |
logger.warning_once(
|
1264 |
+
f"layers {remove_layers} are incompatible with the setting. They will be removed..."
|
1265 |
)
|
1266 |
|
1267 |
cutoff_layers = [i for i in cutoff_layers if i not in remove_layers]
|
1268 |
if len(cutoff_layers) == 0:
|
1269 |
+
raise ValueError(f"Your cutoff layers must in [{self.config.start_layer}, {self.config.num_hidden_layers}]")
|
1270 |
|
1271 |
# decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn)
|
1272 |
outputs = self.model(
|