Skip to content

Commit

Permalink
Use official serialization API instead of beta. (#387)
Browse files Browse the repository at this point in the history
Update the serialization portion of the code to use the official API. This api now checks the validity of the HLOs and NEFFs (meaning that a recompilation may be necessary). Please use neuron_model.save('./nameofdir') to save the artifacts.
  • Loading branch information
aws-yishanm authored Dec 22, 2023
1 parent 9511675 commit cd59cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/neuron/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _from_pretrained(

if compiled_path is not None:
# Specify the path where compiled artifacts are stored before conversion
neuronx_model._load_compiled_artifacts(compiled_path)
neuronx_model.load(compiled_path)

# Compile the Neuron model (if present compiled artifacts will be reloaded instead of compiled)
neuron_cc_flags = os.environ.get("NEURON_CC_FLAGS", "")
Expand Down

0 comments on commit cd59cac

Please sign in to comment.