Spaces:
Runtime error
Runtime error
fixing load bug
Browse files
app.py
CHANGED
@@ -8,10 +8,17 @@ from config import config
|
|
8 |
model_name = "TheBloke/Mistral-7B-Instruct-v0.2-GPTQ"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
10 |
|
11 |
-
model
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
|
17 |
def respond(
|
|
|
8 |
model_name = "TheBloke/Mistral-7B-Instruct-v0.2-GPTQ"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
10 |
|
11 |
+
print("model start loading")
|
12 |
+
model = AutoModelForCausalLM.from_pretrained(model_name,
|
13 |
+
device_map="auto",
|
14 |
+
trust_remote_code=False,
|
15 |
+
revision="main")
|
16 |
+
print("model loaded")
|
17 |
+
|
18 |
+
# model = AutoModelForCausalLM.from_pretrained(config["model_checkpoint"],
|
19 |
+
# device_map="auto",
|
20 |
+
# trust_remote_code=False,
|
21 |
+
# revision="main")
|
22 |
|
23 |
|
24 |
def respond(
|