ASR model of ai4Bharat

asr_model = nemo_asr.models.ASRModel.from_pretrained(“ai4bharat/indicconformer_stt_mr_hybrid_ctc_rnnt_large”)

While loading a model from huggingface below model_config.yaml error occurs :
README.md: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 1.98k/1.98k [00:00<00:00, 23.4MB/s].gitattributes: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 1.60k/1.60k [00:00<00:00, 18.5MB/s]
(…)cconformer_stt_ml_hybrid_rnnt_large.nemo: 100%|███████████████████████████████████████████████████████████████| 523M/523M [00:27<00:00, 18.8MB/s]
Fetching 3 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:28<00:00, 9.39s/it]
[NeMo I 2024-12-25 02:00:24 save_restore_connector:134] Restoration will occur within pre-extracted directory : /home/bhai/.cache/torch/NeMo/NeMo_1.23.0rc0/hf_hub_cache/ai4bharat/indicconformer_stt_ml_hybrid_ctc_rnnt_large/0406e77848eea1b4878a959e3daae364.
Traceback (most recent call last):
File “/home/bhai/Swamiji/ASR/test.py”, line 6, in
asr_model = nemo_asr.models.ASRModel.from_pretrained(“ai4bharat/indicconformer_stt_ml_hybrid_ctc_rnnt_large”)
File “/home/bhai/Swamiji/ASR/asr_venv/src/nemo-toolkit/nemo/core/classes/common.py”, line 754, in from_pretrained
instance = class_.restore_from(
File “/home/bhai/Swamiji/ASR/asr_venv/src/nemo-toolkit/nemo/core/classes/modelPT.py”, line 450, in restore_from
instance = cls.save_restore_connector.restore_from(
File “/home/bhai/Swamiji/ASR/asr_venv/src/nemo-toolkit/nemo/core/connectors/save_restore_connector.py”, line 255, in restore_from
loaded_params = self.load_config_and_state_dict(
File “/home/bhai/Swamiji/ASR/asr_venv/src/nemo-toolkit/nemo/core/connectors/save_restore_connector.py”, line 155, in load_config_and_state_dict
conf = OmegaConf.load(config_yaml)
File “/home/bhai/Swamiji/ASR/asr_venv/lib/python3.10/site-packages/omegaconf/omegaconf.py”, line 189, in load
with io.open(os.path.abspath(file
), “r”, encoding=“utf-8”) as f:
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/bhai/.cache/torch/NeMo/NeMo_1.23.0rc0/hf_hub_cache/ai4bharat/indicconformer_stt_ml_hybrid_ctc_rnnt_large/0406e77848eea1b4878a959e3daae364/model_config.yaml’
How do we resolve the above error while downloading or loading the model?

1 Like

hi @doshipradnyesh

Could it be related to NeMo 1.0 vs NeMo 2.0? I’m quoting from NeMo 2.0 — NVIDIA NeMo Framework User Guide

In NeMo 1.0, the main interface for configuring experiments is through YAML files. This approach allows for a declarative way to set up experiments, but it has limitations in terms of flexibility and programmatic control. NeMo 2.0 shifts to a Python-based configuration, which offers several advantages

This is from the model page; have you seen it before?

AI4Bharat NeMo:

To load, train, fine-tune or play with the model you will need to install AI4Bharat NeMo. We recommend you install it using the command shown below

git clone https://github.com/AI4Bharat/NeMo.git && cd NeMo && git checkout nemo-v2 && bash reinstall.sh
1 Like