hugo1234 commited on
Commit
74904cf
1 Parent(s): 48fec73

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +7 -4
utils.py CHANGED
@@ -68,7 +68,7 @@ def generate_prompt_with_history(text, history, tokenizer, max_length=2048):
68
 
69
  #tokenizer = AutoTokenizer.from_pretrained("project-baize/baize-v2-7b")
70
  #model = AutoModelForCausalLM.from_pretrained("project-baize/baize-v2-7b")
71
- #tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-1.3B")
72
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-1.3B")
73
  #tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-2.7B")
74
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-2.7B")
@@ -76,11 +76,14 @@ def generate_prompt_with_history(text, history, tokenizer, max_length=2048):
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
- base_model = "dbmdz/bert-base-italian-cased"
84
  if torch.cuda.is_available():
85
  device = "cuda"
86
  else:
 
68
 
69
  #tokenizer = AutoTokenizer.from_pretrained("project-baize/baize-v2-7b")
70
  #model = AutoModelForCausalLM.from_pretrained("project-baize/baize-v2-7b")
71
+ #tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-1.3B") ok
72
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-1.3B")
73
  #tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-2.7B")
74
  #model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-2.7B")
 
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
+ tokenizer = AutoTokenizer.from_pretrained("asi/gpt-fr-cased-small")
82
+ model = AutoModelForCausalLM.from_pretrained("asi/gpt-fr-cased-small")
83
+
84
 
85
  def load_tokenizer_and_model(base_model,load_8bit=False):
86
+ base_model = "asi/gpt-fr-cased-small"
87
  if torch.cuda.is_available():
88
  device = "cuda"
89
  else: