E-Hospital commited on
Commit
c3d009e
1 Parent(s): b98feba

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -1,8 +1,15 @@
1
  from transformers import AutoTokenizer, AutoModelForCausalLM
2
  import torch
 
3
 
 
 
 
 
 
 
 
4
 
5
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
6
 
7
  model = AutoModelForCausalLM.from_pretrained(
8
  "E-Hospital/open-orca-platypus-2-lora-medical",
 
1
  from transformers import AutoTokenizer, AutoModelForCausalLM
2
  import torch
3
+ import logging
4
 
5
+ logger = logging.getLogger()
6
+
7
+ device = torch.device("cuda" if torch.cuda.is_available() else "CPU")
8
+
9
+ num_of_gpus = torch.cuda.device_count()
10
+ logger.info("Getting gpus")
11
+ logger.info(num_of_gpus)
12
 
 
13
 
14
  model = AutoModelForCausalLM.from_pretrained(
15
  "E-Hospital/open-orca-platypus-2-lora-medical",