Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
parler-tts
Commits
cb44e483
Commit
cb44e483
authored
Feb 21, 2024
by
Yoach Lacombe
Browse files
fix vocab_size in dummy init
parent
226fe07f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
init_dummy_model.py
init_dummy_model.py
+4
-2
No files found.
init_dummy_model.py
View file @
cb44e483
from
stable_speech
import
StableSpeechConfig
,
StableSpeechForCausalLM
,
StableSpeechForConditionalGeneration
,
StableSpeechDecoderConfig
from
transformers
import
T5Config
,
EncodecConfig
from
transformers
import
AutoConfig
decoder_config
=
StableSpeechDecoderConfig
(
max_position_embeddings
=
1024
,
max_position_embeddings
=
2048
,
num_hidden_layers
=
2
,
ffn_dim
=
256
,
num_attention_heads
=
4
,
...
...
@@ -24,11 +24,13 @@ decoder = StableSpeechForCausalLM(decoder_config)
decoder
.
save_pretrained
(
"/home/yoach/dataspeech/artefacts/decoder/"
)
t5
=
AutoConfig
.
from_pretrained
(
"t5-base"
)
model
=
StableSpeechForConditionalGeneration
.
from_sub_models_pretrained
(
text_encoder_pretrained_model_name_or_path
=
"t5-base"
,
audio_encoder_pretrained_model_name_or_path
=
"facebook/encodec_32khz"
,
decoder_pretrained_model_name_or_path
=
"/home/yoach/dataspeech/artefacts/decoder/"
,
vocab_size
=
t5
.
vocab_size
)
# set the appropriate bos/pad token ids
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment