Skip to content

Commit ea24c2c

Browse files
committed
Revert default Pool::Cls for JinaCodeBertModel
1 parent 6ce1559 commit ea24c2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backends/candle/src/models/jina_code.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ impl JinaCodeBertModel {
356356
};
357357

358358
let pool = match model_type {
359-
ModelType::Classifier => Pool::Cls,
359+
ModelType::Classifier => {
360+
candle::bail!("`classifier` model type is not supported for JinaCode")
361+
}
360362
ModelType::Embedding(pool) => {
361363
if pool == Pool::Splade {
362364
candle::bail!("`splade` is not supported for JinaCode")
@@ -654,6 +656,7 @@ impl Model for JinaCodeBertModel {
654656
fn is_padded(&self) -> bool {
655657
true
656658
}
659+
657660
fn embed(&self, batch: Batch) -> Result<(Option<Tensor>, Option<Tensor>)> {
658661
self.forward(batch)
659662
}

0 commit comments

Comments
 (0)