Update baby-llama.cpp
Seems to be an error in the implementation of the operator!= function. It attempts to compare the this pointer (a llama_hparams_lora object) with the other pointer (a llama_hparams object) using memcmp. This can lead to incorrect results because the sizes of the objects being compared (sizeof(llama_hparams) and sizeof(llama_hparams_lora)) are different, should now be able to compare two llama_hparams_lora objects for inequality.
This commit is contained in:
parent
58970a4c39
commit
9301ff0624
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ struct llama_hparams_lora {
|
|||
uint32_t n_lora = 64;
|
||||
|
||||
bool operator!=(const llama_hparams & other) const {
|
||||
return memcmp(this, &other, sizeof(llama_hparams));
|
||||
return memcmp(this, &other, sizeof(llama_hparams)) != 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue