facebookresearch/fairseq

Is there any plans to support torch.export?

Offen

#5.519 geöffnet am 05.07.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (6.224 Forks)batch import
enhancementhelp wantedneeds triage

Repository-Metriken

Stars
 (29.107 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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)

Contributor Guide