mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	 62cfc54f77
			
		
	
	62cfc54f77
	
	
	
		
			
			Command that calculates some statistics over the errors introduced by quantization, like mean square error, max error and some percentile errors for layer weights. Should be useful for testing quantization improvements. Exposes some internal state from ggml and llama for testing
		
			
				
	
	
		
			38 lines
		
	
	
		
			674 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			674 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| # dependencies
 | |
| 
 | |
| find_package(Threads REQUIRED)
 | |
| 
 | |
| # third-party
 | |
| 
 | |
| # ...
 | |
| 
 | |
| # common
 | |
| 
 | |
| set(TARGET common)
 | |
| 
 | |
| add_library(${TARGET} OBJECT
 | |
|     common.h
 | |
|     common.cpp
 | |
|     )
 | |
| 
 | |
| if (BUILD_SHARED_LIBS)
 | |
|     set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
 | |
| endif()
 | |
| 
 | |
| target_include_directories(${TARGET} PUBLIC .)
 | |
| target_compile_features(${TARGET} PUBLIC cxx_std_11)
 | |
| target_link_libraries(${TARGET} PRIVATE llama)
 | |
| 
 | |
| # examples
 | |
| 
 | |
| include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 | |
| 
 | |
| if (EMSCRIPTEN)
 | |
| else()
 | |
|     add_subdirectory(main)
 | |
|     add_subdirectory(quantize)
 | |
|     add_subdirectory(quantize-stats)
 | |
|     add_subdirectory(perplexity)
 | |
|     add_subdirectory(embedding)
 | |
| endif()
 |