replace `model.generate` with custom generation function to optimize kv_cache a0dec77 verified bird-of-paradise commited on Jul 20