Skip to content

Commit

Permalink
update: disable LastToken pooling for ModernBert
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Jan 6, 2025
1 parent 1fe761f commit ccb633c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backends/candle/src/models/modernbert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ impl ModernBertModel {
candle::bail!("`splade` is not supported for ModernBert")
}

if pool == Pool::LastToken {
candle::bail!("`LastToken` is not supported for ModernBert")
}

(pool, None)
}
};
Expand Down

0 comments on commit ccb633c

Please sign in to comment.