llama.cpp
50518b64 - model : hrm : do not compute slot count as uint32_t (#32601)

Commit
1 day ago
model : hrm : do not compute slot count as uint32_t (#32601) load_arch_hparams multiplies n_hrm_layers_per_stack, n_hrm_h_cycles and (n_hrm_l_cycles + 1) into a uint32_t, then asserts the product equals block_count. Any factors whose true product is block_count + k*2^32 still pass the assert; 1073741825 * 2 * 2 = 2^32 + 4 compares equal to block_count = 4. load_arch_tensors iterates the same three values in int and writes past the end of the block_count-sized layers vector.
Author
Parents
Loading