venkat-natchi commited on
Commit
3c70c98
·
verified ·
1 Parent(s): 9b7046c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,13 +43,13 @@ phi_model_name = "microsoft/phi-2"
43
  text_tokenizer = AutoTokenizer.from_pretrained(
44
  phi_model_name, trust_remote_code=True)
45
  with torch.no_grad():
46
- tuned_phi2 = AutoModelForCausalLM.from_pretrained(
47
- "stage2_adaptor", trust_remote_code=True,
48
- )
49
  base_phi2_text = AutoModelForCausalLM.from_pretrained(
50
  phi_model_name, trust_remote_code=True,
51
  device_map="auto", torch_dtype=torch.float16
52
  )
 
 
 
53
  print("phi2 model loaded")
54
 
55
  audio_model_name = "openai/whisper-small"
 
43
  text_tokenizer = AutoTokenizer.from_pretrained(
44
  phi_model_name, trust_remote_code=True)
45
  with torch.no_grad():
 
 
 
46
  base_phi2_text = AutoModelForCausalLM.from_pretrained(
47
  phi_model_name, trust_remote_code=True,
48
  device_map="auto", torch_dtype=torch.float16
49
  )
50
+ tuned_phi2 = AutoModelForCausalLM.from_pretrained(
51
+ "stage2_adaptor", trust_remote_code=True,
52
+ ).to("cpu")
53
  print("phi2 model loaded")
54
 
55
  audio_model_name = "openai/whisper-small"