File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -277,19 +277,12 @@ impl CandleBackend {
277
277
tracing:: info!( "Starting MPNet model on {:?}" , device) ;
278
278
Ok ( Box :: new ( MPNetModel :: load ( vb, & config, model_type) . s ( ) ?) )
279
279
}
280
- ( Config :: ModernBert ( config) , Device :: Cpu | Device :: Metal ( _) ) => match device {
281
- Device :: Metal ( _) => {
282
- return Err ( BackendError :: Start (
283
- "ModernBert is not currently supported on MPS device" . to_string ( ) ,
284
- ) ) ;
285
- }
286
- _ => {
287
- tracing:: info!( "Starting ModernBert model on {:?}" , device) ;
288
- Ok ( Box :: new (
289
- ModernBertModel :: load ( vb, & config, model_type) . s ( ) ?,
290
- ) )
291
- }
292
- } ,
280
+ ( Config :: ModernBert ( config) , Device :: Cpu | Device :: Metal ( _) ) => {
281
+ tracing:: info!( "Starting ModernBert model on {:?}" , device) ;
282
+ Ok ( Box :: new (
283
+ ModernBertModel :: load ( vb, & config, model_type) . s ( ) ?,
284
+ ) )
285
+ }
293
286
#[ cfg( feature = "cuda" ) ]
294
287
( Config :: Bert ( config) , Device :: Cuda ( _) ) => {
295
288
if cfg ! ( any( feature = "flash-attn" , feature = "flash-attn-v1" ) )
You can’t perform that action at this time.
0 commit comments