Skip to content

Commit

Permalink
Update T5DecodingWeight.cc
Browse files Browse the repository at this point in the history
fix: fix loading bug of t5
  • Loading branch information
byshiue authored Apr 17, 2023
1 parent 4402759 commit 0c12805
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/fastertransformer/models/t5/T5DecodingWeight.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ void T5DecodingWeight<T>::loadModel(std::string dir_path)
}

if (t5_with_bias) {
loadWeightFromBin<T>(
weights_ptr[4], {(size_t)weights_size[4]}, dir_path + "/decoder.final_layer_norm.bias.bin");
loadWeightFromBin<T>(weights_ptr[5], {(size_t)weights_size[5]}, dir_path + "/shared.bias.bin");
loadWeightFromBin<T>(weights_ptr[4],
{(size_t)weights_size[4]},
dir_path + "/decoder.final_layer_norm.bias.bin",
model_file_type);
loadWeightFromBin<T>(weights_ptr[5], {(size_t)weights_size[5]}, dir_path + "/shared.bias.bin", model_file_type);
}

for (int l = 0; l < num_layer_; l++) {
Expand Down

0 comments on commit 0c12805

Please sign in to comment.