Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,25 +8,24 @@ import gradio as gr
|
|
8 |
# checkpoint = "tiiuae/falcon-7b"
|
9 |
# checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
10 |
# checkpoint = "gpt2"
|
11 |
-
checkpoint = "
|
12 |
|
13 |
model = AutoModelForCausalLM.from_pretrained(
|
14 |
checkpoint, device_map="auto",
|
15 |
offload_folder="off_load",
|
16 |
-
|
17 |
# torch_dtype="auto",
|
18 |
)
|
19 |
-
|
20 |
-
|
21 |
-
# torch_dtype="auto"
|
22 |
-
# )
|
23 |
-
|
24 |
-
# model = "tiiuae/FalconLite2"
|
25 |
-
tokenizer = AutoTokenizer.from_pretrained(model,
|
26 |
-
# trust_remote_code=True,
|
27 |
torch_dtype="auto"
|
28 |
)
|
29 |
|
|
|
|
|
|
|
|
|
|
|
30 |
pipeline = transformers.pipeline(
|
31 |
"text-generation",
|
32 |
model=model,
|
|
|
8 |
# checkpoint = "tiiuae/falcon-7b"
|
9 |
# checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
10 |
# checkpoint = "gpt2"
|
11 |
+
checkpoint = "amazon/FalconLite2"
|
12 |
|
13 |
model = AutoModelForCausalLM.from_pretrained(
|
14 |
checkpoint, device_map="auto",
|
15 |
offload_folder="off_load",
|
16 |
+
trust_remote_code=True,
|
17 |
# torch_dtype="auto",
|
18 |
)
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint,
|
20 |
+
trust_remote_code=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
torch_dtype="auto"
|
22 |
)
|
23 |
|
24 |
+
# model = "tiiuae/FalconLite2"
|
25 |
+
# tokenizer = AutoTokenizer.from_pretrained(model,
|
26 |
+
# torch_dtype="auto"
|
27 |
+
# )
|
28 |
+
|
29 |
pipeline = transformers.pipeline(
|
30 |
"text-generation",
|
31 |
model=model,
|