Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/models/kv_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ DefaultKeyValueCache::DefaultKeyValueCache(State& state)
}

// Set the size after empty_past_ has been created with 0 for this field
if (model_.config_->model.decoder.sliding_window.has_value() &&
if (state_.model_.p_device_->GetType() == DeviceType::NvTensorRtRtx && model_.config_->model.decoder.sliding_window.has_value() &&
model_.config_->model.decoder.sliding_window->window_size > 0) {
const int sliding_window_size = model_.config_->model.decoder.sliding_window->window_size;
const int max_length = state_.params_->search.max_length;
Expand Down
Loading