Skip to content

Commit 12a909f

Browse files
DamonFoolCISC
andauthored
Update src/llama-model.cpp
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 7efe517 commit 12a909f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/llama-model.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,11 +1542,8 @@ void llama_model::load_hparams(llama_model_loader & ml) {
15421542
hparams.dec_start_token_id = dec_start_token_id;
15431543
}
15441544

1545-
uint32_t num_decoder_layers;
1546-
if (ml.get_key(LLM_KV_NUM_DECODER_LAYERS, num_decoder_layers, false)) {
1547-
hparams.n_dec_layer = num_decoder_layers;
1548-
GGML_ASSERT(hparams.n_dec_layer > 0 && "T5 requires num_decoder_layers > 0");
1549-
}
1545+
hparams.n_dec_layer = hparams.n_layer;
1546+
ml.get_key(LLM_KV_DECODER_BLOCK_COUNT, hparams.n_dec_layer, false);
15501547

15511548
switch (hparams.n_layer) {
15521549
case 6: type = LLM_TYPE_60M; break; // t5-small

0 commit comments

Comments
 (0)