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

commit #11

Open
wants to merge 1 commit into
base: corvo
Choose a base branch
from
Open
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
28 changes: 26 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,30 @@
"unordered_set": "cpp",
"future": "cpp",
"cfenv": "cpp",
"typeindex": "cpp"
"typeindex": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"__verbose_abort": "cpp",
"bit": "cpp",
"ios": "cpp",
"locale": "cpp",
"queue": "cpp",
"stack": "cpp",
"variant": "cpp",
"__nullptr": "cpp",
"__string": "cpp",
"compare": "cpp",
"concepts": "cpp"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ void LlamaDecoderLayerWeight<T>::loadModel(std::string dir_path, FtCudaDataType
{
FT_CHECK(is_maintain_buffer == true);
const std::string rank_spec = std::to_string(tensor_para_rank_);
FT_LOG_INFO("loading llama model weight rank %s from %s", rank_spec, dir_path);

// fill all bias to zeros
deviceFill(weights_ptr[0], (size_t)hidden_units_, (T)0.0);
Expand Down Expand Up @@ -285,6 +286,7 @@ void LlamaDecoderLayerWeight<T>::loadModel(std::string dir_path, FtCudaDataType
model_file_type);

}
FT_LOG_INFO("finished loading llama model weight rank %s from %s", rank_spec, dir_path);
}

template<typename T>
Expand Down
2 changes: 2 additions & 0 deletions src/fastertransformer/models/llama/LlamaWeight.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ void LlamaWeight<T>::loadModel(std::string dir_path)
{
FtCudaDataType model_file_type = getModelFileType(dir_path + "/config.ini", "llama");
FT_CHECK(is_maintain_buffer == true);
FT_LOG_INFO("loading llama model from %s", dir_path);

loadWeightFromBin<T>(
weights_ptr[0], {(size_t)(vocab_size_ * hidden_units_)}, dir_path + "/model.wte.weight.bin", model_file_type);
Expand Down Expand Up @@ -292,6 +293,7 @@ void LlamaWeight<T>::loadModel(std::string dir_path)
decoder_layer_weights[l]->loadModel(dir_path + "/model.layers." + std::to_string(l), model_file_type);
}
}
FT_LOG_INFO("finished loading llama model from %s", dir_path);
}

template<typename T>
Expand Down