STT En FastConformer Hybrid Transducer-CTC Large Streaming 80ms pretrained model fails to be loaded
State: closed | Pull request: no
Labels: name: bug

**Describe the bug**

I cannot use the "STT En FastConformer Hybrid Transducer-CTC Large Streaming 80ms". First of all, the NGC catalog instructions don't work. But more importantly, there is a shape mismatch error "size mismatch for encoder.pre_encode.out.weight: copying a param with shape torch.Size([512, 2816]) from checkpoint, the shape in current model is torch.Size([512, 2560])." even when I work around that.

**Steps/Code to reproduce bug**

First of all, the instructions at https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_en_fastconformer_hybrid_large_streaming_80ms, namely:

```
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="stt_en_fastconformer_hybrid_large_streaming_80ms")
```

Fails with the following:

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dgalvez/scratch/code/asr/riva-asrlib-decoder/NeMo/nemo/core/classes/common.py", line 848, in from_pretrained
    class_, nemo_model_file_in_cache = cls._get_ngc_pretrained_model_info(
  File "/home/dgalvez/scratch/code/asr/riva-asrlib-decoder/NeMo/nemo/core/classes/common.py", line 900, in _get_ngc_pretrained_model_info
    raise FileNotFoundError(
FileNotFoundError: Model stt_en_fastconformer_hybrid_large_streaming_80ms was not found. Check cls.list_available_models() for the list of all available models.
```

I tried to work around this by 

```
wget --content-disposition https://api.ngc.nvidia.com/v2/models/nvidia/nemo/stt_en_fastconformer_hybrid_large_streaming_80ms/versions/1.20.0/zip -O stt_en_fastconformer_hybrid_large_streaming_80ms_1.20.0.zip
unzip stt_en_fastconformer_hybrid_large_streaming_80ms_1.20.0.zip
python -c "import nemo.collections.asr as nemo_asr; model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.restore_from('stt_en_fastconformer_hybrid_large_streaming_80ms.nemo')"
```

Fails with:

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/dgalvez/scratch/code/asr/riva-asrlib-decoder/NeMo/nemo/core/classes/modelPT.py", line 434, in restore_from
    instance = cls._save_restore_connector.restore_from(
  File "/home/dgalvez/scratch/code/asr/riva-asrlib-decoder/NeMo/nemo/core/connectors/save_restore_connector.py", line 246, in restore_from
    self.load_instance_with_state_dict(instance, state_dict, strict)
  File "/home/dgalvez/scratch/code/asr/riva-asrlib-decoder/NeMo/nemo/core/connectors/save_restore_connector.py", line 201, in load_instance_with_state_dict
    instance.load_state_dict(state_dict, strict=strict)
  File "/home/dgalvez/scratch/miniconda3/envs/wfst/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1667, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for EncDecHybridRNNTCTCBPEModel:
        size mismatch for encoder.pre_encode.out.weight: copying a param with shape torch.Size([512, 2816]) from checkpoint, the shape in current model is torch.Size([512, 2560]).

```

**Expected behavior**

The model should be able to be constructed like other pretrained models uploaded to NGC..