mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	llama/ggml: add LLM training support (#10544)
* llama/ggml: add LLM training support more compact progress bar llama_save_model_to_file llama_opt_param_filter ggml_graph_dup force_grads refactor ggml_opt, fix test-opt * remove logits_all * refactor CUDA implementation for ACC * reset graph at beginning of opt period
This commit is contained in:
		| @@ -301,12 +301,12 @@ namespace GGUFMeta { | ||||
|             GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(meta.get(), kid); | ||||
|  | ||||
|         switch (arr_info.gt) { | ||||
|             case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T, float>::value)); break; | ||||
|             case GGUF_TYPE_INT32:   GGML_ASSERT( | ||||
|                                             (std::is_same<T,  int32_t>::value) || | ||||
|                                             (std::is_same<T, uint32_t>::value));  break; | ||||
|             case GGUF_TYPE_UINT32: | ||||
|             case GGUF_TYPE_INT32:   GGML_ASSERT((std::is_same<T,  int32_t>::value) || | ||||
|                                                 (std::is_same<T, uint32_t>::value)); break; | ||||
|             case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T,    float>::value)); break; | ||||
|             default: | ||||
|                 throw std::runtime_error(format("%s is not a float32, int32 array", key.c_str())); | ||||
|                 throw std::runtime_error(format("%s is not a float32/uint32/int32 array", key.c_str())); | ||||
|         } | ||||
|  | ||||
|         result.resize(arr_info.length); | ||||
| @@ -330,12 +330,12 @@ namespace GGUFMeta { | ||||
|             GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(meta.get(), kid); | ||||
|  | ||||
|         switch (arr_info.gt) { | ||||
|             case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T, float>::value)); break; | ||||
|             case GGUF_TYPE_INT32:   GGML_ASSERT( | ||||
|                                             (std::is_same<T,  int32_t>::value) || | ||||
|                                             (std::is_same<T, uint32_t>::value));  break; | ||||
|             case GGUF_TYPE_UINT32: | ||||
|             case GGUF_TYPE_INT32:   GGML_ASSERT((std::is_same<T,  int32_t>::value) || | ||||
|                                                 (std::is_same<T, uint32_t>::value)); break; | ||||
|             case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T,    float>::value)); break; | ||||
|             default: | ||||
|                 throw std::runtime_error(format("%s is not a float32, int32 array", key.c_str())); | ||||
|                 throw std::runtime_error(format("%s is not a float32/uint32/int32 array", key.c_str())); | ||||
|         } | ||||
|  | ||||
|         if (arr_info.length > N_MAX) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Johannes Gäßler
					Johannes Gäßler