Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate batch of LMs #2249

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ jobs:
# Test FLAC input
time ./bin/run-ci-ldc93s1-flac.sh --epochs 1

# Test LM gen
time ./bin/run-ci-lm-gen-batch.sh

# Test LM opt
time ./bin/run-ci-lm-opt.sh
training-sdb-tests:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.train
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ RUN apt-get update && \
libvorbisfile3 \
libopusfile0 \
libsndfile1 \
libboost-program-options-dev \
libboost-thread-dev \
sox \
libsox-fmt-mp3 \
python3-venv \
Expand Down
24 changes: 24 additions & 0 deletions bin/run-ci-lm-gen-batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# This test optimizes the scorer for testing purposes

set -xe

lm_path="./data/lm"
sources_lm_filepath="./data/smoke_test/vocab.txt"

# Force only one visible device because we have a single-sample dataset
# and when trying to run on multiple devices (like GPUs), this will break

python data/lm/generate_lm_batch.py \
--input_txt "${sources_lm_filepath}" \
--output_dir "${lm_path}" \
--top_k_list 30000 \
--arpa_order_list "4" \
--max_arpa_memory "85%" \
--arpa_prune_list "0|0|2" \
--binary_a_bits 255 \
--binary_q_bits 8 \
--binary_type trie \
--kenlm_bins /code/kenlm/build/bin/ \
-j 1
Empty file modified data/lm/generate_lm.py
100644 → 100755
Empty file.
Loading