jscore2023
commited on
Commit
•
794244a
1
Parent(s):
ab8d3b7
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -13,9 +13,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
13 |
|
14 |
class EndpointHandler():
|
15 |
def __init__(self, path=""):
|
16 |
-
config = PeftConfig.from_pretrained(
|
17 |
model = AutoModelForCausalLM.from_pretrained("vilsonrodrigues/falcon-7b-instruct-sharded", device_map={"":0}, trust_remote_code=True, torch_dtype=torch.float16)
|
18 |
-
self.tokenizer = AutoTokenizer.from_pretrained("
|
19 |
# Load the Lora model
|
20 |
self.model = PeftModel.from_pretrained(model, "jscore2023/falcon-7b-3")
|
21 |
|
|
|
13 |
|
14 |
class EndpointHandler():
|
15 |
def __init__(self, path=""):
|
16 |
+
config = PeftConfig.from_pretrained("jscore2023/falcon-7b-3")
|
17 |
model = AutoModelForCausalLM.from_pretrained("vilsonrodrigues/falcon-7b-instruct-sharded", device_map={"":0}, trust_remote_code=True, torch_dtype=torch.float16)
|
18 |
+
self.tokenizer = AutoTokenizer.from_pretrained("jscore2023/falcon-7b-3")
|
19 |
# Load the Lora model
|
20 |
self.model = PeftModel.from_pretrained(model, "jscore2023/falcon-7b-3")
|
21 |
|