Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -10,15 +10,15 @@ from model.modeling_llamask import LlamaskForCausalLM
|
|
10 |
from model.tokenizer_utils import generate_custom_mask, prepare_tokenizer
|
11 |
|
12 |
|
13 |
-
access_token = os.getenv("HF_TOKEN")
|
14 |
-
model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
15 |
-
device = 'cpu'
|
16 |
|
17 |
-
model = LlamaskForCausalLM.from_pretrained(model_id, torch_dtype= torch.bfloat16, token=access_token)
|
18 |
-
model = model.to(device)
|
19 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
|
20 |
|
21 |
-
prepare_tokenizer(tokenizer)
|
22 |
|
23 |
|
24 |
def respond(
|
|
|
10 |
from model.tokenizer_utils import generate_custom_mask, prepare_tokenizer
|
11 |
|
12 |
|
13 |
+
# access_token = os.getenv("HF_TOKEN")
|
14 |
+
# model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
15 |
+
# device = 'cpu'
|
16 |
|
17 |
+
# model = LlamaskForCausalLM.from_pretrained(model_id, torch_dtype= torch.bfloat16, token=access_token)
|
18 |
+
# model = model.to(device)
|
19 |
+
# tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
|
20 |
|
21 |
+
# prepare_tokenizer(tokenizer)
|
22 |
|
23 |
|
24 |
def respond(
|