Skip to main content

export

Export a PyTorch model to .pte format for ExecuTorch. Use when converting models, lowering to edge, or generating .pte files.

来源信息

仓库
pytorch/executorch
最近来源活动
2026年2月19日 19:51
检测到的 SKILL.md 语言
英语
星标
5,164
Forks
1,238

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
export
description
Export a PyTorch model to .pte format for ExecuTorch. Use when converting models, lowering to edge, or generating .pte files.
# Export ## Basic pattern ```python from executorch.exir import to_edge_transform_and_lower from torch.export import export exported = export(model.eval(), example_inputs) edge = to_edge_transform_and_lower(exported) with open("model.pte", "wb") as f: f.write(edge.to_executorch().buffer) ``` ## Model-specific scripts | Model | Script | |-------|--------| | Llama | `examples/models/llama/export_llama.py` | | Whisper | `examples/models/whisper/` | | Parakeet | `examples/models/parakeet/export_parakeet_tdt.py` | ## Debugging - Draft export: `export(model, inputs, strict=False)` - tlparse: `TORCH_LOGS="+dynamo,+export" python script.py 2>&1 | tlparse` ## Guides - [torch.export basics](guides/torch-export.md) — `torch.export.export()`, dynamic shapes, strict mode, debugging
在 GitHub 查看