Skip to content

Commit

Permalink
修复from_hf创建的模型在tfacc上运行不起来的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
黄宇扬 committed May 9, 2024
1 parent a7dccd1 commit 6081a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fastllm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ namespace fastllm {
realDims[1] *= 2;
}
this->weight[key] = Data(dataType, realDims);
this->weight[key].name = std::string(key);
Data &data = this->weight[key];
data.weightType = WeightType::LINEAR;
data.UpdateUnitSize();
Expand Down Expand Up @@ -2007,6 +2008,7 @@ namespace fastllm {
void WeightMap::AddWeight(const std::string &key, const std::vector<int> &dims, fastllm::DataType dataType,
fastllm::WeightType weightType, fastllm::DataType oriDataType, uint8_t *oriData, int groupCnt) {
this->weight[key] = Data(dataType, dims);
this->weight[key].name = std::string(key);
Data &data = this->weight[key];
data.weightType = weightType;
data.UpdateUnitSize();
Expand Down
Binary file modified third_party/tfacc/server
Binary file not shown.

0 comments on commit 6081a40

Please sign in to comment.