Skip to content

Commit

Permalink
Add LoRA for Zipformer (#1540)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoyang1998 authored Mar 15, 2024
1 parent f28c05f commit 2dfd5db
Show file tree
Hide file tree
Showing 17 changed files with 9,196 additions and 7 deletions.
1 change: 1 addition & 0 deletions egs/librispeech/ASR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The following table lists the differences among them.
| `lstm_transducer_stateless3` | LSTM | Embedding + Conv1d | Using LSTM with mechanisms in reworked model + gradient filter + delay penalty |
| `zipformer` | Upgraded Zipformer | Embedding + Conv1d | The latest recipe |
| `zipformer_adapter` | Upgraded Zipformer | Embedding + Conv1d | It supports domain adaptation of Zipformer using parameter efficient adapters |
| `zipformer_adapter` | Upgraded Zipformer | Embedding + Conv1d | Finetune Zipformer with LoRA |

The decoder in `transducer_stateless` is modified from the paper
[Rnn-Transducer with Stateless Prediction Network](https://ieeexplore.ieee.org/document/9054419/).
Expand Down
10 changes: 3 additions & 7 deletions egs/librispeech/ASR/tdnn_lstm_ctc/asr_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,18 +479,14 @@ def test_other_cuts(self) -> CutSet:
@lru_cache()
def gigaspeech_subset_small_cuts(self) -> CutSet:
logging.info("About to get Gigaspeech subset-S cuts")
return load_manifest_lazy(self.args.manifest_dir / "gigaspeech_cuts_S.jsonl.gz")
return load_manifest_lazy(self.args.manifest_dir / "cuts_S.jsonl.gz")

@lru_cache()
def gigaspeech_dev_cuts(self) -> CutSet:
logging.info("About to get Gigaspeech dev cuts")
return load_manifest_lazy(
self.args.manifest_dir / "gigaspeech_cuts_DEV.jsonl.gz"
)
return load_manifest_lazy(self.args.manifest_dir / "cuts_DEV.jsonl.gz")

@lru_cache()
def gigaspeech_test_cuts(self) -> CutSet:
logging.info("About to get Gigaspeech test cuts")
return load_manifest_lazy(
self.args.manifest_dir / "gigaspeech_cuts_TEST.jsonl.gz"
)
return load_manifest_lazy(self.args.manifest_dir / "cuts_TEST.jsonl.gz")
1 change: 1 addition & 0 deletions egs/librispeech/ASR/zipformer_lora/asr_datamodule.py
1 change: 1 addition & 0 deletions egs/librispeech/ASR/zipformer_lora/beam_search.py
Loading

0 comments on commit 2dfd5db

Please sign in to comment.