Apply suggestions from code review

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Xuan Son Nguyen 2025-01-02 13:50:49 +01:00 committed by GitHub
parent 1dbd16abb9
commit a90e064262
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -2681,7 +2681,7 @@ struct server_context {
// check if we can batch this slot with the previous one // check if we can batch this slot with the previous one
if (!slot_batched) { if (!slot_batched) {
slot_batched = &slot; slot_batched = &slot;
} else if (slot_batched && !slot_batched->can_batch_with(slot)) { } else if (!slot_batched->can_batch_with(slot)) {
continue; continue;
} }

View file

@ -826,7 +826,7 @@ static std::vector<common_lora_adapter_container> parse_lora_request(
} }
// set value // set value
for (auto entry : data) { for (const auto & entry : data) {
int id = json_value(entry, "id", -1); int id = json_value(entry, "id", -1);
float scale = json_value(entry, "scale", 0.0f); float scale = json_value(entry, "scale", 0.0f);
if (0 <= id && id < max_idx) { if (0 <= id && id < max_idx) {