File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -229,10 +229,15 @@ impl CandleBackend {
229
229
"Qwen2 is only supported on Cuda devices in fp16 with flash attention enabled"
230
230
. to_string ( ) ,
231
231
) ) ,
232
- ( Config :: MPNet ( config) , Device :: Cpu | Device :: Metal ( _) ) => {
233
- tracing:: info!( "Starting MPNet model on {:?}" , device) ;
234
- Ok ( Box :: new ( MPNetModel :: load ( vb, & config, model_type) . s ( ) ?) )
235
- }
232
+ ( Config :: MPNet ( config) , Device :: Cpu | Device :: Metal ( _) ) => match device {
233
+ Device :: Cpu => {
234
+ tracing:: info!( "Starting MPNet model on {:?}" , device) ;
235
+ Ok ( Box :: new ( MPNetModel :: load ( vb, & config, model_type) . s ( ) ?) )
236
+ }
237
+ _ => Err ( BackendError :: Start (
238
+ "MPNet is only supported on CPU devices in fp32" . to_string ( ) ,
239
+ ) ) ,
240
+ } ,
236
241
#[ cfg( feature = "cuda" ) ]
237
242
( Config :: Bert ( config) , Device :: Cuda ( _) ) => {
238
243
if cfg ! ( any( feature = "flash-attn" , feature = "flash-attn-v1" ) )
You can’t perform that action at this time.
0 commit comments