Commit 73b2149f authored by baberabb's avatar baberabb
Browse files

removed rnd from task.fewshot_context in write_out.py; add mps in huggingface.py

parent 283cad70
...@@ -107,6 +107,10 @@ class HFLM(LM): ...@@ -107,6 +107,10 @@ class HFLM(LM):
device = int(device) device = int(device)
self._device = torch.device(device) self._device = torch.device(device)
eval_logger.info(f"Using device '{device}'") eval_logger.info(f"Using device '{device}'")
if device == "mps":
eval_logger.info(
"MPS is still in beta; add ,dtype=float32 to model_args ."
)
else: else:
eval_logger.info("Device not specified") eval_logger.info("Device not specified")
eval_logger.info(f"Cuda Available? {torch.cuda.is_available()}") eval_logger.info(f"Cuda Available? {torch.cuda.is_available()}")
......
...@@ -58,7 +58,6 @@ def main(): ...@@ -58,7 +58,6 @@ def main():
ctx = task.fewshot_context( ctx = task.fewshot_context(
doc=doc, doc=doc,
num_fewshot=args.num_fewshot, num_fewshot=args.num_fewshot,
rnd=rnd,
) )
f.write(ctx + "\n") f.write(ctx + "\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment