You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anyone gotten this to work? Also after running the command to make the .pte file it came out to 15.29 gigs.. I thought this would be much smaller? can you explain to me like i'm a dog. I'm an android developer with no python or llm experience but learning a lot!!
I keep getting this error when I try to run python export_model.py
python export_model.py
W0904 13:50:55.270000 21535 torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/dialects/edge/_ops.py:9: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
Main
Exporting to aten dialect
Lowering to edge dialect
Exporting to executorch
Saving to phi3_mini_lora.pte
Done.
Exporting phi3-mini with LoRA for training
Exporting to aten dialect
Creating a joint forward-backwards graph for training
Lowering to edge dialect
Traceback (most recent call last):
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 144, in
main()
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 140, in main
export_phi3_mini_lora_training(lora_training_model)
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 102, in export_phi3_mini_lora_training
edge_program = to_edge(joint_graph)
^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 114, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 1373, in to_edge
edge_programs[name] = _generate_edge_program(name, config, program)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 814, in _generate_edge_program
EXIRATenDialectVerifier(
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/verification/verifier.py", line 74, in call
return self._check_graph_module(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/torch/_export/verifier.py", line 263, in _check_graph_module
_check_valid_op(node.target)
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/torch/_export/verifier.py", line 244, in _check_valid_op
self.check_valid_op(op)
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/verification/verifier.py", line 129, in check_valid_op
raise SpecViolationError(
torch._export.verifier.SpecViolationError:
Operator torch._ops.aten.empty_permuted.default is not in Core ATen opset (https://pytorch.org/docs/stable/torch.compiler_ir.html#core-aten-ir)."
There are a few things to try:
You can proceed with to_edge(compile_config=EdgeCompileConfig(_core_aten_ops_exception_list=[torch.ops.aten.empty_permuted.default])).
Please make sure that the backend(s) you are planning to lower to is able to handle aten.empty_permuted.default, or you have a corresponding kernel linked to your runtime.
Sometimes inference and training gives slightly different op set. Try adding with torch.no_grad(): context manager if you are export for inference only.
If the error persists after 2, this is likely caused by torch.export() + core ATen decomposition producing unexpected operators for your model.
If you believe this operator should be included into core ATen opset, please create an issue in https://github.com/pytorch/pytorch/issues and add module: core aten tag.
When I tried to replace the to_edge function call with :
to_edge(compile_config=EdgeCompileConfig(_core_aten_ops_exception_list=[torch.ops.aten.empty_permuted.default]))
the compiler couldn't find EdgeCompileConfig.. what library do I need or is this not the right path? and it should just work like the readme shows.?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone gotten this to work? Also after running the command to make the .pte file it came out to 15.29 gigs.. I thought this would be much smaller? can you explain to me like i'm a dog. I'm an android developer with no python or llm experience but learning a lot!!
I keep getting this error when I try to run
python export_model.py
python export_model.py
W0904 13:50:55.270000 21535 torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/dialects/edge/_ops.py:9: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
Main
Exporting to aten dialect
Lowering to edge dialect
Exporting to executorch
Saving to phi3_mini_lora.pte
Done.
Exporting phi3-mini with LoRA for training
Exporting to aten dialect
Creating a joint forward-backwards graph for training
Lowering to edge dialect
Traceback (most recent call last):
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 144, in
main()
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 140, in main
export_phi3_mini_lora_training(lora_training_model)
File "/Users/risaki/git/executorch/examples/models/phi-3-mini-lora/export_model.py", line 102, in export_phi3_mini_lora_training
edge_program = to_edge(joint_graph)
^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 114, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 1373, in to_edge
edge_programs[name] = _generate_edge_program(name, config, program)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/program/_program.py", line 814, in _generate_edge_program
EXIRATenDialectVerifier(
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/verification/verifier.py", line 74, in call
return self._check_graph_module(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/torch/_export/verifier.py", line 263, in _check_graph_module
_check_valid_op(node.target)
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/torch/_export/verifier.py", line 244, in _check_valid_op
self.check_valid_op(op)
File "/Users/risaki/git/executorch/pyenv/lib/python3.12/site-packages/executorch/exir/verification/verifier.py", line 129, in check_valid_op
raise SpecViolationError(
torch._export.verifier.SpecViolationError:
Operator torch._ops.aten.empty_permuted.default is not in Core ATen opset (https://pytorch.org/docs/stable/torch.compiler_ir.html#core-aten-ir)."
There are a few things to try:
You can proceed with
to_edge(compile_config=EdgeCompileConfig(_core_aten_ops_exception_list=[torch.ops.aten.empty_permuted.default]))
.Please make sure that the backend(s) you are planning to lower to is able to handle aten.empty_permuted.default, or you have a corresponding kernel linked to your runtime.
Sometimes inference and training gives slightly different op set. Try adding
with torch.no_grad():
context manager if you are export for inference only.If the error persists after 2, this is likely caused by torch.export() + core ATen decomposition producing unexpected operators for your model.
If you believe this operator should be included into core ATen opset, please create an issue in https://github.com/pytorch/pytorch/issues and add
module: core aten
tag.When I tried to replace the to_edge function call with :
to_edge(compile_config=EdgeCompileConfig(_core_aten_ops_exception_list=[torch.ops.aten.empty_permuted.default]))
the compiler couldn't find EdgeCompileConfig.. what library do I need or is this not the right path? and it should just work like the readme shows.?
Beta Was this translation helpful? Give feedback.
All reactions