Skip to main content
skill CX Codex

export — Claude Code skill: what it does, how to install

export — a Claude Code skill that converts PyTorch models into .pte format for ExecuTorch and generates edge deployment artifacts.

BSD-3-Clause 21 installs ★ 5,187 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pytorch/executorch --skill export -a claude-code
Open on GitHub

What export does

This skill coordinates PyTorch model conversion to the ExecuTorch runtime format via graph transformation and lowering pipelines. It includes paths for specific architectures like Llama and Whisper using dedicated scripts from the repository.

Debugging options cover non-strict mode exports and log aggregation via tlparse combined with Dynamo logs. Working with the skill requires a Python environment with PyTorch and the executorch package installed.

What it helps with

  • convert a PyTorch model to .pte format
  • run model-specific export scripts for Llama or Whisper
  • export models with strict equals false for debugging
  • parse export and dynamo logs using tlparse

Example prompts for the agent

  • Export the loaded PyTorch model to a .pte file for ExecuTorch
  • Run the export script for Llama from the examples directory
  • Debug export issues by piping logs into tlparse

How to install export

1Skills CLI (Vercel)

npx skills add pytorch/executorch --skill export -a claude-code

2Manually: put the files in place

~/.claude/skills/export/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/export/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about export

How to install export in Claude Code?

Run npx skills add pytorch/executorch --skill export -a claude-code in your terminal.

What does export do?

It translates PyTorch models into .pte binaries for ExecuTorch, providing scripts and debugging patterns for edge lowering.

What is needed to use export?

You need Python, PyTorch, and the executorch library installed in your environment.

Source text

SKILL.md · BSD-3-Clause
---
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

© pytorch · BSD-3-Clause · pytorch/executorch

Similar skills

All skills for AI and ML →

From the same set4

Project sponsors

Companies that keep this analytics open