Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor committed Jan 23, 2025
1 parent 619735c commit 510c29e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cpp/src/continuous_batching_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void ContinuousBatchingPipeline::ContinuousBatchingImpl::initialize_pipeline(
}

size_t max_sequence_cache_occupation_length_in_blocks = scheduler_config.max_num_batched_tokens / m_scheduler->get_block_size() + 1;
size_t embedding_size = device_config.get_head_size();
size_t embedding_size = device_config.get_k_head_size(0);
m_cache_rotation_calculator = std::make_shared<CacheRotationCalculator>(
m_scheduler->get_block_size(),
max_sequence_cache_occupation_length_in_blocks,
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/src/device_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class DeviceConfig {
return m_key_cache_shape[id];
}

size_t get_head_size() const {
return m_head_size;
size_t get_k_head_size(size_t layer_id) const {
return m_kv_heads_config[layer_id].k_head_size;
}

ov::PartialShape get_value_cache_shape(size_t id) const {
Expand Down
4 changes: 3 additions & 1 deletion src/python/openvino_genai/py_openvino_genai.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ class CacheEvictionConfig:
:param aggregation_mode: The mode used to compute the importance of tokens for eviction
:type aggregation_mode: openvino_genai.AggregationMode
:param apply_rotation: Whether to apply cache rotation (RoPE-based) after each eviction
:param apply_rotation: Whether to apply cache rotation (RoPE-based) after each eviction.
Set this to false if your model has different RoPE scheme from the one used in the
original llama model and you experience accuracy issues with cache eviction enabled.
:type apply_rotation: bool
"""
aggregation_mode: AggregationMode
Expand Down

0 comments on commit 510c29e

Please sign in to comment.