Skip to content

Commit

Permalink
llama系列最小上下文长度提到16k (早期的llama上下文太小了)
Browse files Browse the repository at this point in the history
  • Loading branch information
黄宇扬 committed Jun 27, 2024
1 parent b1e6c8e commit 73b6d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace fastllm {
if (this->weight.dicts.find("rope_scaling.factor") != this->weight.dicts.end()) {
rope_factor = atof(this->weight.dicts["rope_scaling.factor"].c_str());
}
std::pair<std::vector<float>, std::vector<float>> &&pair = this->UpdateRotaryPosEmb(rope_base, rope_factor);
std::pair<std::vector<float>, std::vector<float>> &&pair = this->UpdateRotaryPosEmb(rope_base, rope_factor, std::max(max_positions, 16384));
sinData.ToDevice(DataDevice::CPU);
cosData.ToDevice(DataDevice::CPU);
sinData.CopyFrom(Data(DataType::FLOAT32, { (int)this->sin.size(), (int)this->sin[0].size() }, pair.first));
Expand Down

0 comments on commit 73b6d27

Please sign in to comment.