Spaces:
Runtime error
Runtime error
blackwingedkite
commited on
Commit
•
ebcadc0
1
Parent(s):
7959bed
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,3 @@
|
|
1 |
-
from huggingface_hub import notebook_login
|
2 |
-
import torch
|
3 |
-
import transformers
|
4 |
-
from transformers import AutoModelForMaskedLM, AutoTokenizer
|
5 |
-
from transformers import pipeline
|
6 |
-
from transformers import LlamaTokenizer, LlamaForCausalLM
|
7 |
-
import time
|
8 |
-
import csv
|
9 |
-
import locale
|
10 |
-
locale.getpreferredencoding = lambda: "UTF-8"
|
11 |
-
|
12 |
-
|
13 |
-
notebook_login()
|
14 |
checkpoint = "ziqingyang/chinese-alpaca-2-7b"
|
15 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
16 |
model = AutoModelForMaskedLM.from_pretrained(checkpoint)
|
@@ -34,8 +21,4 @@ model = AutoModelForMaskedLM.from_pretrained(checkpoint)
|
|
34 |
--learning_rate 5e-5 \
|
35 |
--num_train_epochs 3.0 \
|
36 |
--plot_loss \
|
37 |
-
--fp16
|
38 |
-
|
39 |
-
|
40 |
-
model.push_to_hub("gutalk_classification")
|
41 |
-
tokenizer.push_to_hub("gutalk_classification")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
checkpoint = "ziqingyang/chinese-alpaca-2-7b"
|
2 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
3 |
model = AutoModelForMaskedLM.from_pretrained(checkpoint)
|
|
|
21 |
--learning_rate 5e-5 \
|
22 |
--num_train_epochs 3.0 \
|
23 |
--plot_loss \
|
24 |
+
--fp16
|
|
|
|
|
|
|
|