Skip to content

Commit

Permalink
Adapt to changes in field types in LayerConfig of gemma.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ufownl committed Dec 21, 2024
1 parent 30fded1 commit 361fd39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class kv_cache_size_store {
kv_cache_size_store(const gcpp::ModelConfig& cfg, size_t pos) {
store_[static_cast<size_t>(kv_cache_field::kv_cache)] = cfg.CachePosSize() * pos * sizeof(std::declval<gcpp::KVCache>().kv_cache[0]);
auto griffin_layers = cfg.NumLayersOfType(gcpp::LayerAttentionType::kGriffinRecurrentBlock);
size_t conv1d_width = 0;
decltype(std::declval<gcpp::LayerConfig>().conv1d_width) conv1d_width = 0;
for (const auto& layer_cfg: cfg.layer_configs) {
conv1d_width = std::max(conv1d_width, layer_cfg.conv1d_width);
}
Expand Down

0 comments on commit 361fd39

Please sign in to comment.