-
moto authored
* [BC-Breaking] Split pretraining and finetuning factory functions Previously, factory functions of wav2vec2 only generated the architecture for the fine-tuning architecture used in wav2ve2 paper for ASR task. That is, pre-training architecture + Linear module, and it did not provide a straightforward way to generate architectures for pre-training. The goal of the original implementation was to allow the inference of wav2vec2 in non-Python environment via TorchScript. Now we would like to expand it to pre-training/fine-tuning and HuBERT model as well. Therefore, we need to have factory functions for both pre-training and fine-tuning. This commit introduces new factory functions and separate functions for pre-training and fine-tuning. 1. New functions for ASR fine-tuning. We introdcue `wav2vec2_asr_XXX` functions which generates the architecture used for the fine-tuning task in wav2vec2 paper. *1 2. Re-purpse the old functions The existing functions, `wav2vec2_XXX`, now generates the architecture with pre-trainig module only. (no Linear module) Note *1 This architecture is just one way to define architecture for fine-tuning and it is not universal definition. The new `wav2vec2_asr_XXX` functions are designed to provide these specific fine-tuning configuration and they are not meant to support generic architecture for downstream task.
b2e9f1e4