File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ such as:
5353
5454### Supported Models
5555
56- You can use any BERT or XLM-RoBERTa model with absolute positions in ` text-embeddings-inference ` .
56+ You can use any BERT, CamemBERT or XLM-RoBERTa model with absolute positions in ` text-embeddings-inference ` .
5757
5858** Support for other model types will be added in the future.**
5959
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ impl CandleBackend {
3434 // Check model type
3535 if config. model_type != Some ( "bert" . to_string ( ) )
3636 && config. model_type != Some ( "xlm-roberta" . to_string ( ) )
37+ && config. model_type != Some ( "camembert" . to_string ( ) )
3738 {
3839 return Err ( BackendError :: Start ( format ! (
3940 "Model {:?} is not supported" ,
Original file line number Diff line number Diff line change @@ -214,12 +214,13 @@ async fn main() -> Result<()> {
214214 ) ;
215215 tokenizer. with_padding ( None ) ;
216216
217- // Position IDs offset. Used for Roberta.
218- let position_offset = if & config. model_type == "xlm-roberta" {
219- config. pad_token_id + 1
220- } else {
221- 0
222- } ;
217+ // Position IDs offset. Used for Roberta and camembert.
218+ let position_offset =
219+ if & config. model_type == "xlm-roberta" || & config. model_type == "camembert" {
220+ config. pad_token_id + 1
221+ } else {
222+ 0
223+ } ;
223224 let max_input_length = config. max_position_embeddings - position_offset;
224225
225226 let tokenization_workers = args
You can’t perform that action at this time.
0 commit comments