Skip to content

Commit ce09234

Browse files
committed
avoid duplicate lookup of lora tensor
1 parent 1e72471 commit ce09234

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lora.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ struct LoraModel : public GGMLRunner {
147147
}
148148
} else {
149149
const std::string& name = tensor_storage.name;
150-
if (lora_tensors.count(name)) {
151-
*dst_tensor = lora_tensors.at(name);
150+
auto iter = lora_tensors.find(name);
151+
if (iter != lora_tensors.end()) {
152+
*dst_tensor = iter->second;
152153
}
153154
}
154155
return true;

0 commit comments

Comments
 (0)