AstraBert commited on
Commit
96b6df4
1 Parent(s): 51187cc

phi commit

Browse files
Files changed (1) hide show
  1. utils.py +4 -1
utils.py CHANGED
@@ -13,7 +13,7 @@ from pypdf import PdfMerger
13
  from argparse import ArgumentParser
14
 
15
 
16
- mod = "google/gemma-2b"
17
  tsk = "text-generation"
18
 
19
  def merge_pdfs(pdfs: list):
@@ -132,12 +132,15 @@ def just_chatting(
132
  try:
133
  tokenizer = AutoTokenizer.from_pretrained(
134
  mod,
 
135
  )
136
 
137
  tokenizer.pad_token = tokenizer.eos_token
138
 
139
  model = AutoModelForCausalLM.from_pretrained(
140
  mod,
 
 
141
  )
142
  except Exception as e:
143
  import sys
 
13
  from argparse import ArgumentParser
14
 
15
 
16
+ mod = "microsoft/phi-1_5"
17
  tsk = "text-generation"
18
 
19
  def merge_pdfs(pdfs: list):
 
132
  try:
133
  tokenizer = AutoTokenizer.from_pretrained(
134
  mod,
135
+ trust_remote_code=True,
136
  )
137
 
138
  tokenizer.pad_token = tokenizer.eos_token
139
 
140
  model = AutoModelForCausalLM.from_pretrained(
141
  mod,
142
+ trust_remote_code=True,
143
+ torch_dtype="auto",
144
  )
145
  except Exception as e:
146
  import sys