Charlie81 commited on
Commit
19d51ff
·
1 Parent(s): 224e1c5

use path for HFLM

Browse files
Files changed (1) hide show
  1. scripts/eval.py +3 -10
scripts/eval.py CHANGED
@@ -227,22 +227,15 @@ def load_custom_model(args) -> HFLM:
227
  "float32": torch.float32
228
  }[args.dtype]
229
 
230
- # Load the custom model
231
- hf_model = MyOlmoeForCausalLM.from_pretrained(
232
- args.model_path,
233
- config=config,
234
- torch_dtype=torch_dtype,
235
- device_map="auto" if args.device == "auto" else None,
236
- trust_remote_code=args.trust_remote_code
237
- ).eval()
238
 
239
  # Wrap in HFLM
240
  model = HFLM(
241
- pretrained=hf_model,
242
  device=args.device,
243
  batch_size=args.batch_size,
244
  max_batch_size=args.max_batch_size,
245
- dtype=args.dtype
 
246
  )
247
 
248
  logger.info("Custom model loaded successfully")
 
227
  "float32": torch.float32
228
  }[args.dtype]
229
 
 
 
 
 
 
 
 
 
230
 
231
  # Wrap in HFLM
232
  model = HFLM(
233
+ pretrained=args.model_path,
234
  device=args.device,
235
  batch_size=args.batch_size,
236
  max_batch_size=args.max_batch_size,
237
+ dtype=args.dtype,
238
+ trust_remote_code=args.trust_remote_code
239
  )
240
 
241
  logger.info("Custom model loaded successfully")