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:
53
53
54
54
### Supported Models
55
55
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 ` .
57
57
58
58
** Support for other model types will be added in the future.**
59
59
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ impl CandleBackend {
34
34
// Check model type
35
35
if config. model_type != Some ( "bert" . to_string ( ) )
36
36
&& config. model_type != Some ( "xlm-roberta" . to_string ( ) )
37
+ && config. model_type != Some ( "camembert" . to_string ( ) )
37
38
{
38
39
return Err ( BackendError :: Start ( format ! (
39
40
"Model {:?} is not supported" ,
Original file line number Diff line number Diff line change @@ -214,12 +214,13 @@ async fn main() -> Result<()> {
214
214
) ;
215
215
tokenizer. with_padding ( None ) ;
216
216
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
+ } ;
223
224
let max_input_length = config. max_position_embeddings - position_offset;
224
225
225
226
let tokenization_workers = args
You can’t perform that action at this time.
0 commit comments