Skip to content

Commit 12a7734

Browse files
style
1 parent 6f5ea53 commit 12a7734

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/rerank/rerank_calculator_ov.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class RerankCalculatorOV : public CalculatorBase {
177177
throw std::runtime_error(std::string{"Chunking failed: "} + std::string(status.message()));
178178
}
179179
SPDLOG_LOGGER_DEBUG(rerank_calculator_logger, "Number of chunks: {}; with max token count: {} after chunking", tokens.input_ids.get_shape()[0], tokens.input_ids.get_shape()[1]);
180-
180+
181181
size_t tokens_count_of_longest_document = out_input_ids.get_shape()[1];
182182
if (tokens_count_of_longest_document > max_tokens_per_chunk)
183183
throw std::runtime_error("tokens_count_of_longest_document exceeds max_tokens_per_chunk"); // should never happen
@@ -225,7 +225,7 @@ class RerankCalculatorOV : public CalculatorBase {
225225
std::fill(attention_mask_data, attention_mask_data + total_tokens_count_per_batch, int64_t(0));
226226
std::fill(attention_mask_data, attention_mask_data + 1 + query_tokens.size() + 2 + pad_token_index + 1, int64_t(1));
227227
}
228-
228+
229229
return std::make_pair(input_ids, attention_mask);
230230
}
231231

@@ -278,7 +278,7 @@ class RerankCalculatorOV : public CalculatorBase {
278278
// Prepare inputs for rerank model
279279
std::vector<size_t> chunk_mapping;
280280
auto [input_ids, attention_mask] = PrepareInputsForRerankModel(handler, chunk_mapping);
281-
281+
282282
// Compute scores using rerank model
283283
size_t batch_size = handler.getDocumentsList().size();
284284
auto scores = ComputeScoresUsingRerankModel(

src/sidepacket_servable.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SidepacketServable::SidepacketServable(const std::string& modelDir, const std::s
4040
} else {
4141
parsedModelsPath = fsModelsPath.string();
4242
}
43-
std::filesystem::path configPath =(std::filesystem::path(graphPath) / fsModelsPath / "config.json");
43+
std::filesystem::path configPath = (std::filesystem::path(graphPath) / fsModelsPath / "config.json");
4444
if (std::filesystem::exists(configPath)) {
4545
SPDLOG_ERROR("CONFIG {}", configPath.string());
4646
std::ifstream ifs(configPath.string());
@@ -69,8 +69,7 @@ SidepacketServable::SidepacketServable(const std::string& modelDir, const std::s
6969
}
7070
if (modelConfig.HasMember("sep_token_id") && modelConfig["sep_token_id"].IsInt64()) {
7171
sep_token = modelConfig["sep_token_id"].GetInt64();
72-
}
73-
else{
72+
} else {
7473
sep_token = eos_token;
7574
}
7675
}

0 commit comments

Comments
 (0)