File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2366,8 +2366,8 @@ struct server_context {
23662366 // length of the Longest Common Subsequence between the current slot's prompt and the input prompt
23672367 int cur_lcs_len = slot.cache_tokens .get_common_prefix (task.prompt_tokens );
23682368
2369- // fraction of the common subsequence length compared to the current slot's prompt length
2370- float cur_similarity = static_cast < float > (cur_lcs_len) / static_cast < int >(slot. cache_tokens .size () );
2369+ // fraction of the common subsequence length
2370+ float cur_similarity = float (cur_lcs_len) / task. prompt_tokens .size ();
23712371
23722372 // select the current slot if the criteria match
23732373 if (cur_lcs_len > lcs_len && cur_similarity > slot_prompt_similarity) {
You can’t perform that action at this time.
0 commit comments