hugo1234 commited on
Commit
475968c
1 Parent(s): 24b87ce

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -2
utils.py CHANGED
@@ -74,8 +74,10 @@ def generate_prompt_with_history(text, history, tokenizer, max_length=2048):
74
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-2.7B")
75
  #tokenizer = AutoTokenizer.from_pretrained("dbmdz/electra-base-italian-xxl-cased-discriminator")
76
  #model = AutoModelForCausalLM.from_pretrained("dbmdz/electra-base-italian-xxl-cased-discriminator")
77
- tokenizer = AutoTokenizer.from_pretrained("it5/it5-large-headline-generation")
78
- model = AutoModelForCausalLM.from_pretrained("it5/it5-large-headline-generation")
 
 
79
 
80
  def load_tokenizer_and_model(base_model,load_8bit=False):
81
  if torch.cuda.is_available():
 
74
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-2.7B")
75
  #tokenizer = AutoTokenizer.from_pretrained("dbmdz/electra-base-italian-xxl-cased-discriminator")
76
  #model = AutoModelForCausalLM.from_pretrained("dbmdz/electra-base-italian-xxl-cased-discriminator")
77
+ #tokenizer = AutoTokenizer.from_pretrained("it5/it5-large-headline-generation")
78
+ #model = AutoModelForCausalLM.from_pretrained("it5/it5-large-headline-generation")
79
+ tokenizer = AutoTokenizer.from_pretrained("dbmdz/bert-base-italian-cased")
80
+ model = AutoModelForCausalLM.from_pretrained("dbmdz/bert-base-italian-cased")
81
 
82
  def load_tokenizer_and_model(base_model,load_8bit=False):
83
  if torch.cuda.is_available():