llama : use reserve/emplace_back in sampler_sample (#9534)
This commit updates the llama_sampler_sample function to use reserve and emplace_back for the vector of llama_token_data structs. The motivation for this change is to avoid the creation of n_vocab default-constructed llama_token_data structs which are then immediately overwritten.
D
Daniel Bevenius committed
6443ddd98576a9da904ef9f07df4e4398bb6a01a
Parent: 8a30835
Committed by GitHub <noreply@github.com>
on 9/18/2024, 11:42:36 AM