facebookresearch/fairseq

Is there any plans to support torch.export?

オープン

#5,519 opened on 2024/07/05

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Python (6,224 件のフォーク)batch import
enhancementhelp wantedneeds triage

Repository metrics

Stars
 (29,107 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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)

コントリビューターガイド