pytorch/executorch

PyTorch 모델을 스마트폰·마이크로컨트롤러 등 엣지 기기에 직접 배포하는 온디바이스 AI 런타임

설치형 도구확인 필요 · NOASSERTION모바일Python난이도
4,774+18이번 주0
1,059포크904이슈
데모·홈페이지 열기executorch.ai

중간맛 분석

스택: PyTorch(Python) + 12가지 하드웨어 백엔드(XNNPACK, CoreML, Qualcomm, Vulkan, ARM 등) 난이도: 중상(export→compile→ 3단계) 즉시 사용성: pip 설치 후 torch.export() + to_edge_transform_and_lower() + 으로 3줄의 Python 코드로 가능. C++/Swift/Kotlin 런타임 제공. 데모: Llama 3.2, LLaVA, Whisper, MobileNetV2, YOLO26 예제 포함. Colab 노트북 제공.

이런 레포예요

이럴 때 쓰면 좋아요

  • 스마트폰 앱에 LLM(Llama) 통합하여 오프라인 텍스트 생성 실행
  • IoT 기기나 마이크로컨트롤러에서 이미지 분류(MobileNetV2) 또는 객체 인식(YOLO) 추론
  • Meta 스마트글래스처럼 VR/AR 기기에서 실시간 음성·비전 멀티모달 모델 구동

핵심 기능

Native PyTorch export(형식 변환 없음)12+ 하드웨어 백엔드(XNNPACK, CoreML, Qualcomm, Vulkan 등)50KB 초경량 런타임으로 마이크로컨트롤러~스마트폰 지원일괄 양자화·메모리 계획·선택적 빌드로 엣지 최적화

대안 대비 차별점

PyTorch 생태계와 완전 통합되어 .onnx나 .tflite 같은 중간 형식 변환 없이 직접 내보낼 수 있고, Meta의 수십억 사용자 제품에서 검증된 프로덕션 기술입니다.

준비물

  • Python 3.9+
  • PyTorch 설치

바로 시작하기

  1. ExecuTorch 설치하기
pip install executorch
  1. PyTorch 모델 내보내기
# Python 코드로 모델 export
python3 << 'EOF'
import torch
from executorch.exir import to_edge_transform_and_lower
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner

model = torch.nn.Linear(10, 5).eval()
example_inputs = (torch.randn(1, 10),)
exported_program = torch.export.export(model, example_inputs)
program = to_edge_transform_and_lower(
    exported_program,
    partitioner=[XnnpackPartitioner()]
).to_executorch()

with open("model.pte", "wb") as f:
    f.write(program.buffer)
print("Model exported to model.pte")
EOF
  1. 로컬에서 실행 테스트하기
python3 << 'EOF'
from executorch.runtime import Runtime
import torch

runtime = Runtime.get()
method = runtime.load_program("model.pte").load_method("forward")
outputs = method.execute([torch.randn(1, 10)])
print("Output shape:", outputs[0].shape)
EOF
  1. Llama 모델 내보내기 (선택사항)
python -m executorch.extension.llm.export.export_llm --model llama3_2 --output llama.pte

별 추이 · 7일

4,774+18 / 7일

활용성 · 따라 만들기 좋은가

따라 하기 좋음샘플 점수 42/100
  • 관대한 라이선스
  • 테스트 있음
  • 예제 디렉토리
  • 최근 활동
  • AGENTS.md
  • llms.txt
  • 템플릿

🟢 최근 활동 있음 · 2022년 생성

이 레포에 깃밥 배지 달기

[![깃밥](https://www.gitbap.com/badge/pytorch/executorch.svg)](https://www.gitbap.com/r/pytorch/executorch)

🔌 클로드에서 바로 써보기

깃밥을 클로드에 연결하면 이런 레포를 클로드·커서·Codex에서 바로 찾고 체험할 수 있어요.

방법 ① 커넥터 URL

클로드 설정 → 커넥터에 이 주소를 붙여넣기.

https://www.gitbap.com/api/mcp
방법 ② 플러그인 (체험까지)

플러그인을 설치하면 /gitbap-trending·/gitbap-try 슬래시 커맨드로 레포를 그 자리에서 체험. Claude Code에서 아래 두 줄을 차례로 실행하세요.

/plugin marketplace add jakeparkcolde/gitbap-cowork
/plugin install gitbap-cowork@gitbap
연결 방법 자세히 →

AI가 README 기반으로 요약했습니다 · 원문 보기