truongghieu
commited on
Commit
•
31a67bd
1
Parent(s):
96551f5
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ import torch
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig,BitsAndBytesConfig
|
4 |
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
-
model = AutoModelForCausalLM.from_pretrained("
|
7 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
8 |
|
9 |
generation_config = GenerationConfig(
|
10 |
penalty_alpha=0.6,
|
|
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig,BitsAndBytesConfig
|
4 |
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
+
model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0", trust_remote_code=True)
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0", trust_remote_code=True)
|
8 |
|
9 |
generation_config = GenerationConfig(
|
10 |
penalty_alpha=0.6,
|