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

update modules #59

Merged
merged 31 commits into from
Apr 6, 2023
Merged

update modules #59

merged 31 commits into from
Apr 6, 2023

Conversation

lifeiteng
Copy link
Owner

@lifeiteng lifeiteng commented Mar 20, 2023

  1. Add continual inference
  2. Support train AR Decoder and NAR Decoder separately
  3. Copy transformer modules from pytorch for Implementing Faster Inference

This maybe the last breaking modification!

@lifeiteng lifeiteng requested a review from zjwang21 March 20, 2023 12:19
self.predict_layers[j].weight = self.nar_embeddings[j + 1].weight
for j in range(0, 6):
self.nar_predict_layers[j].weight = self.nar_audio_embeddings[
j + 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的embedding share为什么只有6层,而且是j+2,我看论文里好像是说,predict_layer只有7层,embedding_layer是8层,所以predict的第1层和embedding的第2层共享,是这样嘛

Copy link
Collaborator

@zjwang21 zjwang21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Work

@lifeiteng
Copy link
Owner Author

lifeiteng commented Apr 6, 2023

demo page https://lifeiteng.github.io/valle/index.html

one GPU with 24GB memory

exp_dir=exp_0331/valle_Prefix1_Dim1024H16L12
python3 bin/trainer.py --max-duration 80 --filter-min-duration 0.5 --filter-max-duration 14 --train-stage 1 \
      --num-buckets 6 --dtype "bf16" --save-every-n 10000 \
      --model-name valle --share-embedding true --norm-first true --add-prenet false \
      --decoder-dim 1024 --nhead 16 --num-decoder-layers 12 --prefix-mode 1 \
      --base-lr 0.05 --warmup-steps 200 --average-period 0 \
      --num-epochs 20 --start-epoch 1 --start-batch 0 --accumulate-grad-steps 4 \
      --exp-dir ${exp_dir}

cp ${exp_dir}/best-valid-loss.pt ${exp_dir}/epoch-2.pt

python3 bin/trainer.py --max-duration 40 --filter-min-duration 0.5 --filter-max-duration 14 --train-stage 2 \
      --num-buckets 6 --dtype "float32" --save-every-n 10000 \
      --model-name valle --share-embedding true --norm-first true --add-prenet false \
      --decoder-dim 1024 --nhead 16 --num-decoder-layers 12 --prefix-mode 1 \
      --base-lr 0.05 --warmup-steps 200 --average-period 0 \
      --num-epochs 20 --start-epoch 3 --start-batch 0 --accumulate-grad-steps 4 \
      --exp-dir ${exp_dir}

@lifeiteng lifeiteng merged commit 1ad7e13 into main Apr 6, 2023
@lifeiteng lifeiteng deleted the stage branch October 16, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants