OssamaLafhel
commited on
Commit
·
038c683
1
Parent(s):
4b15582
Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -158,8 +158,9 @@ transformers.models.gptj.modeling_gptj.GPTJBlock = GPTJBlock # monkey-patch GPT
|
|
158 |
|
159 |
|
160 |
# -----------------------------------------> API <---------------------------------------
|
|
|
161 |
tokenizer = transformers.AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B")
|
162 |
-
model = GPTJForCausalLM.from_pretrained(
|
163 |
device = 0 if torch.cuda.is_available() else -1
|
164 |
|
165 |
|
|
|
158 |
|
159 |
|
160 |
# -----------------------------------------> API <---------------------------------------
|
161 |
+
path=""
|
162 |
tokenizer = transformers.AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B")
|
163 |
+
model = GPTJForCausalLM.from_pretrained(path, low_cpu_mem_usage=True)
|
164 |
device = 0 if torch.cuda.is_available() else -1
|
165 |
|
166 |
|