Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,16 +5,10 @@ import os
|
|
5 |
import torch
|
6 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
7 |
|
8 |
-
# finetuning with original tokenizer
|
9 |
-
CHECKPOINT_PATH= '/work/pnrr_itserr/latin_model/cineca_checkpoints/finetuning-gpt2_2-nodes_tokenizer-original_lr-6e-4_fcocchi'
|
10 |
-
# finetuning with our embedding and tokenizer
|
11 |
-
##CHECKPOINT_PATH= '/work/pnrr_itserr/latin_model/cineca_checkpoints/finetuning-gpt2_2-nodes_tokenizer-our-embedding_lr-6e-4_fcocchi'
|
12 |
-
# scratch with original tokenizer
|
13 |
-
CHECKPOINT_PATH= '/work/pnrr_itserr/latin_model/cineca_checkpoints/scratch_2-nodes_tokenizer-original_packing_fcocchi'
|
14 |
# scratch with latbert tokenizer
|
15 |
-
CHECKPOINT_PATH= '
|
16 |
-
print(f"Loading model from: {CHECKPOINT_PATH}")
|
17 |
|
|
|
18 |
tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT_PATH)
|
19 |
model = AutoModelForCausalLM.from_pretrained(CHECKPOINT_PATH)
|
20 |
|
|
|
5 |
import torch
|
6 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# scratch with latbert tokenizer
|
9 |
+
CHECKPOINT_PATH= 'scratch_2-nodes_tokenizer_latbert-original_packing_fcocchi/model.safetensors'
|
|
|
10 |
|
11 |
+
print(f"Loading model from: {CHECKPOINT_PATH}")
|
12 |
tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT_PATH)
|
13 |
model = AutoModelForCausalLM.from_pretrained(CHECKPOINT_PATH)
|
14 |
|