File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
backends/candle/src/models Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,14 @@ impl FlashQwen3Model {
308
308
ModelType :: Embedding ( pool) => pool,
309
309
} ;
310
310
311
+ // The Qwen3-Reranker models contain the `model` key
312
+ // https://huggingface.co/collections/Qwen/qwen3-reranker-6841b22d0192d7ade9cdefea
313
+ let vb = if vb. contains_tensor ( "model.embed_tokens.weight" ) {
314
+ vb. pp ( "model" )
315
+ } else {
316
+ vb
317
+ } ;
318
+
311
319
let embeddings = Embedding :: new (
312
320
vb. pp ( "embed_tokens" )
313
321
. get ( ( config. vocab_size , config. hidden_size ) , "weight" ) ?,
@@ -497,6 +505,7 @@ impl Model for FlashQwen3Model {
497
505
fn is_padded ( & self ) -> bool {
498
506
false
499
507
}
508
+
500
509
fn embed ( & self , batch : Batch ) -> Result < ( Option < Tensor > , Option < Tensor > ) > {
501
510
self . forward ( batch)
502
511
}
You can’t perform that action at this time.
0 commit comments