facebookresearch/fairseq

Is there any plans to support torch.export?

Open

#5,519 创建于 2024年7月5日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Python (29,107 star) (6,224 fork)batch import
enhancementhelp wantedneeds triage

描述

Hello.

Is there any plans to support torch.export? It would be awesome for developers who wants compilation of fairseq for backends or their deep learning accelerators.

The code would be like below.

from fairseq.models import FairseqEncoderDecoderModel
import torch

translator= FairseqEncoderDecoderModel.from_pretrained(
    # ..
)
example_inputs = translator.dummy_inputs

with torch.no_grad():
    ep = torch.export.export(translator_model, example_inputs)

贡献者指南