ChihChiu29 commited on
Commit
60e4f79
1 Parent(s): 3933325

switched to blenderbot

Browse files
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -12,11 +12,11 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
12
  # FROM: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Thomas%21+How+are+you%3F
13
  # tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
14
  # model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill")
15
- # tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-1B-distill")
16
- # model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-1B-distill")
17
- tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
18
- model = T5ForConditionalGeneration.from_pretrained(
19
- "google/flan-t5-small", device_map="auto")
20
 
21
  token_size_limit = 128
22
 
 
12
  # FROM: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Thomas%21+How+are+you%3F
13
  # tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
14
  # model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill")
15
+ tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-1B-distill")
16
+ model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-1B-distill")
17
+ # tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
18
+ # model = T5ForConditionalGeneration.from_pretrained(
19
+ # "google/flan-t5-small", device_map="auto")
20
 
21
  token_size_limit = 128
22