Commit Graph

2266 Commits

Author SHA1 Message Date
zhxchen17
59d966a92a
Make representation computation branchless in TransformerEncoderBase (#4818)
Summary:
We want to make the computation branchless here because fairseq code may be
exported and traced for deployment purposes, and tracing mechanisms can
break the correctness for a captured program if it's dependent on input data.
In this diff we try to rewrite the code to remove one branch so that tracer
can proceed here and preserve the correct semantics of the model.

Test Plan:
CI

Reviewers:

Subscribers:

Tasks:

Tags:
2022-11-02 15:03:14 -07:00
Hirofumi Inaguma
c8e4ab71e4
Fix UnitY (#4830)
* Fix build_multitask_decoder

* Fix src_lengths in UnitY decoding
2022-10-26 16:09:14 -07:00
Andros Tjandra
0272196aa8
Add LID generate & eval script (#4810)
Co-authored-by: Andros Tjandra <androstj@meta.com>
2022-10-18 13:25:27 -07:00
Andros Tjandra
f2fefe4572
Update README.md (#4809)
Add LID inference documentation.
2022-10-18 10:54:23 -07:00
Mohsen
7a71b8460a
Revert changes to sinusoidal_positional_embedding.py (#4808)
* Revert #4805 and #4708
2022-10-17 17:45:58 -07:00
Mohsen
05625e3e6e
fix #4708 (#4805)
Co-authored-by: moslehpour <moslehpour@meta.com>
2022-10-17 13:04:51 -07:00
dianaml0
66d713b4d0
Update release.yml (#4804) 2022-10-17 13:24:58 -04:00
dianaml0
f3429391b1
Fix GLIBC 2.14 not found error (#4802)
* Fix GLIBC 2.14 not found error

* Update release.yml
2022-10-17 11:59:36 -04:00
dianaml0
b7b7928065
Lower numpy version requirement (#4798) 2022-10-14 21:40:11 -04:00
dianaml0
fdcfd79147
Revert "Update release.yml (#4796)" (#4797)
This reverts commit e40c435266.
2022-10-14 21:37:53 -04:00
dianaml0
e40c435266
Update release.yml (#4796) 2022-10-14 21:27:22 -04:00
dianaml0
4fa4e1f118
Revert "Update release.yml (#4793)" (#4795)
This reverts commit 8adff217f0.
2022-10-14 20:55:06 -04:00
dianaml0
d55ac5d13a
Lower required numpy (#4794) 2022-10-14 17:25:28 -04:00
dianaml0
8adff217f0
Update release.yml (#4793)
Add print statement, add cpython versions
2022-10-14 17:24:56 -04:00
dianaml0
144e7c5157
Remove cpython support as well (#4792) 2022-10-14 14:11:54 -04:00
dianaml0
2727d17aff
Remove support for cpython 3.6 (#4791) 2022-10-14 13:56:58 -04:00
dianaml0
8df77ea9b8
Fix error in workflow (#4790) 2022-10-14 13:39:47 -04:00
Mohsen
16538a0bff
fix dynamicconv test (#4779)
fix broken tests after merging #4775
2022-10-11 23:28:08 -07:00
Mohsen
411d365055
make lightconv scriptable (#4775)
make lightconv scriptable
2022-10-11 14:44:20 -07:00
Mohsen
c20ba1fbe1
make Multihead_attention scriptable (#4773)
Co-authored-by: moslehpour <moslehpour@meta.com>
2022-10-10 18:47:43 -07:00
Mohsen
a3bd672317
make a scriptable dynamicconv (#4772)
Make dynamicconv scriptable
2022-10-10 16:38:20 -07:00
Hirofumi Inaguma
b4001184f4
UnitY implementation (#4670)
* Add UnitY implementation

* Rename for consistency

* Refactor conformer encoder construction

* Change the order of arguments for rdrop_alpha

* Add compute_loss_with_rdrop

* Move build_multitask_decoder to xm_transformer_unity.py

* Fix generator selection

* Fix check in build_criterion

* Modularize Rdrop

* Minor fix

* Refine class names

* Refactor submodules

* Fix CE

* Fix import

* Fix argments for datasets

* Add description to AugTransformerDecoderBase

* Fix SpeechToTextDatasetCreator

* Fix metavar in arguments

* Uncomment override_decoder_args

* Fix comment in warning

* Add is_fisrt_pass_decoder flag

* Change Translatotron2SpeechGenerator to MultiDecoderSpeechGenerator

* Move inference code to examples/speech_to_speech/unity

* Fix rdrop default value in aux tasks

* Add language tag mapping option to multitask-config-yaml

* Rename encoder_out2 and encoder_outs2

* Rename UnitYXMTransformerModel to XMTransformerModelUnitY

* Support num_best_checkpoints in average_checkpoints

* Fix has_multitask

* Inherit SequenceGenerator

* Reflect recent updates

* Minor fix in logging

* Fix typo

* Refactor SpeechToSpectrogram2passMultitaskTaskCriterion

* Minor update for multitask
2022-10-06 19:38:32 -07:00
Hirofumi Inaguma
6d90f79883
Refactor S2ST (#4747)
* Move S2ST submodules to separate files

* Refactoring

* Fix import
2022-10-06 17:38:12 -07:00
Hirofumi Inaguma
21865d5877
Add a missing method to XMTransformer (#4764)
* Add build_multitask_decoder()

* Fix import
2022-10-06 16:36:49 -07:00
Hirofumi Inaguma
9273676f50
Support multitask for XMTransformer (#4763) 2022-10-06 12:43:30 -07:00
Guillaume Wenzek
0e9a425039
drop apex/megatron in CI (not used) (#4757) 2022-10-06 11:18:47 +02:00
Ilia Kulikov
dd0079bde7
use src_lengths from net_input if possible if src_tokens in the input (#4751)
* use src_lengths from net_input if possible

* lint+black
2022-09-30 11:00:15 -07:00
Hirofumi Inaguma
25451b23a2
Add Rdrop (#4730) 2022-09-28 11:44:19 -07:00
Guillaume Wenzek
699ab19014
run all tests (#4733)
* run all tests

* make torch a build-time dependency

* add 'dev' extra deps to install black, flake, pytest at once

* Build docs in CI

This should also help catch some import bugs, since sphinx inspect a lot of code

* CI should do the real install not "--editable"

* check installation succeeded

* add missing __init__.py file

* add check installation

* move check_installation.py to its own script

* fix pytest import mode, force recent numpy, torch

* run black before flake and tests

* torch >= 1.10.0

* use torch 1.10  for GPU tests
2022-09-23 18:40:50 +02:00
Hirofumi Inaguma
03f3a7304e
Support multi-task learning for speech-to-text task (#4732)
* Move TextTargetMultitaskData

* Support MTL for speech-to-text

* Fix for black

* Fix SpeechToTextDatasetCreator

* Suport online text preprocessing

* Add keyword to arguments
2022-09-21 22:41:40 +09:00
Hirofumi Inaguma
adebac6f4f
Add Conv2dSubsampler (#4724)
* Add Conv2dSubsampler

* Add conv_out_channels option
2022-09-20 17:31:00 +09:00
Pengwei Li
59e00272bc
update vocoder to support cpu (#4727)
* update vocoder to support cpu

* lint
2022-09-19 13:01:38 -04:00
Hirofumi Inaguma
56e7fb4761
Fix eval mode for S2ST models during training (#4722)
* Fix eval mode for S2ST models during training

* Add getattr

* Revert change
2022-09-16 11:33:48 +09:00
Hirofumi Inaguma
34ac732927
Fix conformer encoder (#4721) 2022-09-15 15:54:19 +09:00
Hirofumi Inaguma
0cc475b9b4
Reformat speech translation modules (#4707)
* Reformat speech translation modules by black+isort

* Fix argment parser for Conformer

* Move convolution

* Update XMTransformer

* Remove unnecessary lines

* Fix import
2022-09-15 13:08:35 +09:00
Junteng Jia
5ec3a27ea8
add an option to fetch datapoints within a batch in an async manner, … (#4710)
* add an option to fetch datapoints within a batch in an async manner, which is helpful if the fetching is io bound

* add an option to fetch datapoints within a batch in an async manner

Co-authored-by: juntengjia <juntengjia@fb.com>
2022-09-09 16:13:50 -07:00
Michael Suo
dec1e6b044
[fairseq] Guard call to shape_as_tensor with is_in_onnx_export() (#4708)
This is a no-op in eager and in ONNX export, but it's better for other
tracers if this is preserved as shapes directly instead of converted to
a tensor.

There is a little annoying code duplication with
`torch.jit.is_scripting()`, which is unforunately necessary because we
didn't implement compile-time short circuiting correctly in TorchScript
lol.
2022-09-09 14:05:59 -04:00
Adishree Ghatare
eba8a50d2b
[feat][ust] Noise and data augmentation suite (#4692)
* Implemented data augmentation for concatenation  (#3516)

* Implemented ConcatAug as setting from config

* Switched ConcatAug implementation to sweep script

* Added rate and max tokens as ConcatAug params

* Kept original fns, pulled concat_attempts as hyperparam

* Fixed ConcatAug nits

* ConcatAug typing recognizes int and np.int

* Implemented waveform transforms and suite of noise augmentation techniques (#3517)

* Implemented ConcatAug as setting from config

* Switched ConcatAug implementation to sweep script

* Kept original fns, pulled concat_attempts as hyperparam

* Implemented WaveformTransforms, MusicAug

* Removed leftovers from debugging

* Separated out feature_ and waveform_transforms, updated constants, formatting cleanup

* Added Babble and SporadicNoise augmentations

* Fixed zero division error

* Adding BackgroundNoiseAugment

* Added warning for if using feature transforms with waveform input

* warnings, SNR fix

* fix for NoneType extension error

* fix 2 for NoneType extension error

* delete print

* Dataset transform, NoisyOverlapAugment, reframe ConcatAugment (#3533)

* Dataset transform, NoisyOverlapAugment, reframe ConcatAugment

* using np.random instead of python random

* fixed np random upper bound bug

* cleanup

* Changed args & return expressions for waveform transform

* Documented new augmentation features

* Create augmentation_example.md

* Update augmentation_example.md

* Update, benchmarking left to do

* Move docs to speech_to_speech

* Remove docs from speech_to_text

* [docs] Updated clean benchmarks

* [docs] Add benchmark data
2022-09-08 14:14:02 -07:00
Can Balioglu
9a00e0336b
Update CODEOWNERS (#4699) 2022-09-08 08:09:39 -04:00
Can Balioglu
0bad0ce56a
Revert "Fix for #4689. (#4690)" (#4698)
This reverts commit c0c326cbf8.
2022-09-08 08:07:47 -04:00
Bing Han
c0c326cbf8
Fix for #4689. (#4690) 2022-09-01 15:44:26 -04:00
Can Balioglu
d81fac8163
Fix edit_dist.cu header file directives (#4667) 2022-08-29 09:35:08 -04:00
sravyapopuri388
eda703798d
Fix under generation issue for speech to speech translation models by adding optional generation args (#4662)
* OSS ckpts for Interspeech 2022 paper

* HF interface update

* local test

* local test

* revert local test

* address comments

* add Hk<>En models

* add Hk<>En models

* add Hk<>En models

* add hk->en

* add hk->en

* add hk->en

* add hk->en

* add hk->en

* debug

* debug

* debub

* fix undergeneration for S2UT

* fix typo

* fix typo

* fix bug
2022-08-24 11:06:45 -07:00
Marco Gaido
f82661594b
fix padding of s2t_wav_transformer (#4629) 2022-08-24 11:51:52 -04:00
Wei
acd9a53607
update isort (#4568)
Co-authored-by: dianaml0 <82468439+dianaml0@users.noreply.github.com>
2022-08-01 14:26:36 -07:00
Sanchit Gandhi
42360dbc06
Fix uninitialized bias parameters in RelPositionMultiHeadedAttention (#4623) 2022-08-01 10:08:28 -07:00
Ilia Kulikov
4fe8583396
padding fix in the adaptor layer (#4613) 2022-07-29 09:59:52 -07:00
sravyapopuri388
0c5731f921
Support En->Hk model in fairseq hub. (#4614)
* OSS ckpts for Interspeech 2022 paper

* HF interface update

* local test

* local test

* revert local test

* address comments

* add Hk<>En models

* add Hk<>En models

* add Hk<>En models

* add hk->en

* add hk->en

* add hk->en

* add hk->en

* add hk->en
2022-07-27 19:16:04 -07:00
dianaml0
ad3bec5a07
Fix Linting Errors (#4611)
* Update version.txt

* Update create_dict_stop.sh

* Update enhanced_direct_s2st_discrete_units.md

* Update hubert_asr.py

* Update utils.py
2022-07-26 17:25:47 -04:00
Rastislav Rabatin
a546702008
Merge source and target embedding tables into one table (#4594)
Add support for merging source and target embedding table into one table. This feature might hurt performance, but it will decrease the size of the final model.
2022-07-26 16:51:27 +01:00