Skip to content

Commit

Permalink
[fix] gpt2 neuron support handler and ci (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosterberg authored Oct 27, 2023
1 parent 7ed7270 commit 5e25d61
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions engines/python/setup/djl_python/transformers_neuronx.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,7 @@ def load_model(self, model_type):
# TODO: workaround on Neuron Compiler bug for SM
path = os.getcwd()
os.chdir("/tmp")
if model_type == "gpt2":
self.model._load_compiled_artifacts(load_path)
self.model.to_neuron()
self.model._save_compiled_artifacts(load_path)
else:
self.model.to_neuron()
self.model.to_neuron()
os.chdir(path)
elapsed = time.time() - start
logging.info(
Expand Down

0 comments on commit 5e25d61

Please sign in to comment.