mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	llama : fix params struct slignment (#1936)
* Workaround struct misalignment during value-copy Signed-off-by: mudler <mudler@localai.io> * Move booleans at the bottom of the structure Signed-off-by: mudler <mudler@localai.io> * Add comment Signed-off-by: mudler <mudler@localai.io> --------- Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
		 Ettore Di Giacinto
					Ettore Di Giacinto
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							20568fe60f
						
					
				
				
					commit
					aacdbd4056
				
			| @@ -925,21 +925,21 @@ static bool kv_cache_init( | ||||
|  | ||||
| struct llama_context_params llama_context_default_params() { | ||||
|     struct llama_context_params result = { | ||||
|         /*.seed                        =*/ -1, | ||||
|         /*.n_ctx                       =*/ 512, | ||||
|         /*.n_batch                     =*/ 512, | ||||
|         /*.gpu_layers                  =*/ 0, | ||||
|         /*.main_gpu                    =*/ 0, | ||||
|         /*.tensor_split                =*/ {0}, | ||||
|         /*.progress_callback           =*/ nullptr, | ||||
|         /*.progress_callback_user_data =*/ nullptr, | ||||
|         /*.low_vram                    =*/ false, | ||||
|         /*.seed                        =*/ -1, | ||||
|         /*.f16_kv                      =*/ true, | ||||
|         /*.logits_all                  =*/ false, | ||||
|         /*.vocab_only                  =*/ false, | ||||
|         /*.use_mmap                    =*/ true, | ||||
|         /*.use_mlock                   =*/ false, | ||||
|         /*.embedding                   =*/ false, | ||||
|         /*.progress_callback           =*/ nullptr, | ||||
|         /*.progress_callback_user_data =*/ nullptr, | ||||
|     }; | ||||
|  | ||||
|     return result; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user