Spaces:
Runtime error
Runtime error
Update qa_model.py
Browse files- qa_model.py +1 -1
qa_model.py
CHANGED
@@ -37,7 +37,7 @@ class QAModel():
|
|
37 |
model = AutoModelForSeq2SeqLM.from_config(config)
|
38 |
# model = AutoModelForSeq2SeqLM.from_pretrained(tmpdir)
|
39 |
|
40 |
-
model = load_checkpoint_and_dispatch(model, checkpoint=tmpdir, device_map="auto")
|
41 |
return model, tokenizer
|
42 |
|
43 |
def query_model(self, model, tokenizer, query):
|
|
|
37 |
model = AutoModelForSeq2SeqLM.from_config(config)
|
38 |
# model = AutoModelForSeq2SeqLM.from_pretrained(tmpdir)
|
39 |
|
40 |
+
model = load_checkpoint_and_dispatch(model, checkpoint=tmpdir, offload_folder=tmpdir, device_map="auto")
|
41 |
return model, tokenizer
|
42 |
|
43 |
def query_model(self, model, tokenizer, query):
|