Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,21 +5,21 @@ import gradio as gr
|
|
| 5 |
|
| 6 |
# checkpoint = "tiiuae/falcon-40b-instruct"
|
| 7 |
# checkpoint ="tiiuae/falcon-7b-instruct"
|
| 8 |
-
|
| 9 |
# checkpoint = "gpt2"
|
| 10 |
# checkpoint = "vsrinivas/FalconLite2"
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
# tokenizer = AutoTokenizer.from_pretrained(checkpoint,
|
| 18 |
# trust_remote_code=True,
|
| 19 |
# torch_dtype="auto"
|
| 20 |
# )
|
| 21 |
|
| 22 |
-
model = "tiiuae/FalconLite2"
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained(model,
|
| 24 |
trust_remote_code=True,
|
| 25 |
torch_dtype="auto"
|
|
|
|
| 5 |
|
| 6 |
# checkpoint = "tiiuae/falcon-40b-instruct"
|
| 7 |
# checkpoint ="tiiuae/falcon-7b-instruct"
|
| 8 |
+
checkpoint = "tiiuae/falcon-7b"
|
| 9 |
# checkpoint = "gpt2"
|
| 10 |
# checkpoint = "vsrinivas/FalconLite2"
|
| 11 |
|
| 12 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 13 |
+
checkpoint, device_map="auto", offload_folder="offload",
|
| 14 |
+
trust_remote_code=True,
|
| 15 |
+
# torch_dtype="auto",
|
| 16 |
+
)
|
| 17 |
# tokenizer = AutoTokenizer.from_pretrained(checkpoint,
|
| 18 |
# trust_remote_code=True,
|
| 19 |
# torch_dtype="auto"
|
| 20 |
# )
|
| 21 |
|
| 22 |
+
# model = "tiiuae/FalconLite2"
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained(model,
|
| 24 |
trust_remote_code=True,
|
| 25 |
torch_dtype="auto"
|