mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	llama : remove all_pos_0, all_pos_1, all_seq_id from llama_batch (#9745)
* refactor llama_batch_get_one * adapt all examples * fix simple.cpp * fix llama_bench * fix * fix context shifting * free batch before return * use common_batch_add, reuse llama_batch in loop * null terminated seq_id list * fix save-load-state example * fix perplexity * correct token pos in llama_batch_allocr
This commit is contained in:
		| @@ -89,8 +89,8 @@ int main(int argc, char ** argv) { | ||||
|     const auto t_enc_start = ggml_time_us(); | ||||
|  | ||||
|     // eval the prompt | ||||
|     llama_decode(ctx, llama_batch_get_one( inp.data(), n_input - 1, 0,           0)); | ||||
|     llama_decode(ctx, llama_batch_get_one(&inp.back(),           1, n_input - 1, 0)); | ||||
|     llama_decode(ctx, llama_batch_get_one( inp.data(), n_input - 1)); | ||||
|     llama_decode(ctx, llama_batch_get_one(&inp.back(),           1)); | ||||
|  | ||||
|     for (int s = 1; s < W + G + 1; ++s) { | ||||
|         llama_kv_cache_seq_cp(ctx, 0, s, -1, -1); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Xuan Son Nguyen
					Xuan Son Nguyen