Skip to content

Commit

Permalink
Update src/cpp/src/scheduler.hpp
Browse files Browse the repository at this point in the history
Co-authored-by: Ilya Lavrenov <[email protected]>
  • Loading branch information
popovaan and ilya-lavrenov authored Dec 24, 2024
1 parent eebac1f commit 2715110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/src/scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ class Scheduler {
auto gen_config = sequence_groups[idx]->get_sampling_parameters();
seq_length = std::min(seq_length, sequence_groups[idx]->get_prompt_len() + gen_config.get_max_new_tokens(sequence_groups[idx]->get_prompt_len()));
size_t blocks_num = std::ceil((float)seq_length / m_block_manager.get_block_size());
if (gen_config.do_sample && gen_config.is_beam_search()) {
if (gen_config.is_beam_search()) {
blocks_num *= gen_config.num_beams;
} else if (gen_config.do_sample && gen_config.is_multinomial()) {
blocks_num *= gen_config.num_return_sequences;
Expand Down

0 comments on commit 2715110

Please sign in to comment.