-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
49 lines (46 loc) · 3.89 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
SYSTEM:
SKIP_STEPS: False
FILENAME_PREFIX: gguf_tools_mk2
DEFAULT_LOG_LEVEL: DEBUG
FORCE_DEFAULT_LOG_LEVEL_FOR_WHOLE_PROGRAM: True
FILENAMES:
INPUT_FILENAME: "input"
# Tensor to image converter for LLM models (GGUF and PyTorch)
TENSOR_TO_IMAGE:
MODEL: llama-2-7b.Q8_0\llama-2-7b.Q8_0.gguf # model filename, can be GGUF or PyTorch (if PyTorch support available)
MODEL_TYPE: gguf
TENSOR_NAME: blk.30.attn_k.weight # blk.30.attn_k.weight # blk.2.ffn_down.weight # Tensor name, may be specified multiple times UNLESS --match-glob or --match-regex is used
COLOR_RAMP_TYPE: continuous # Color ramp type, Can be discrete or continuous
OUTPUT_NAME: llama-2-7b.Q8_0.gguf.png # Output file, will be prefixed with the tensor name if multiple tensor names are specified
SHOW_WITH: img # Show the result with the specified application. WARNING: If processing multiple tensors and your image application does not block then you will end up with a bunch of huge images displayed at the same time
MATCH_GLOB: True # Interpret tensor name as a glob, so wildcards like blk.0.* will work
MATCH_REGEX: True # Interpret tensor name as a regex, so regular expressions like ^blk\\.[012]\\.attn will work
MATCH_1D: True # When using a wildcard, also match 1 dimensional tensors
ADJUST_1D_ROWS: 32 # Instead of rendering 1D tensors as a wide image with one row, rearrange into multiple rows. For example, if we have a 1D tensor 3,200 elements and specify "--adjust-1d-rows 32", the output image will have dimensions 100x32. Note The tensor size must be divisible by the specified value.
SCALE: 1.0 # Scale the image. Default: 1.0 (no scaling)
FORCE: True # "Force overwriting the output file if it already exists"
OUTPUT_MODE: mean-devs-overall #values-as-is # mean-devs-overall #values-as-is #
# Output modes (see below). Default: devs-overall
# NOTE: If the program is started using start.bat
# the options "mean-devs-overall", "mean-devs-rows", "mean-devs-cols" are available as aliases for
# "devs-overall", "devs-rows", "devs-cols", as well as "median-devs-overall", "median-devs-rows", "median-devs-cols", "values-as-is""
# overall: Calculate the mean and standard deviation over the entire tensor.
# rows : Same as above, except the calculation is based on rows.
# cols : Same as above, except the calculation is based on columns.
# """,
# )
# Produces heatmaps of differences in tensor values for LLM models (GGUF and PyTorch)
TENSOR_COMPARISON_TO_IMAGE:
# Information on output modes:
# devs-*:
# overall: Calculates differences in tensor values between two models with the same foundation architecture.
# By default, output will be a grayscale raster that has the same dimensions as the tensors.
# rows : Same as above, except the calculation is based on rows.
# cols : Same as above, except the calculation is based on columns.
MODEL_FILE_PATH1: llama-2-7b.Q8_0\llama-2-7b.Q8_0.gguf # Filename for the first model, can be GGUF or PyTorch (if PyTorch support available)"
MODEL_FILE_PATH2: llama-2-7b-chat.Q8_0\llama-2-7b-chat.Q8_0.gguf # Filename for the second model, can be GGUF or PyTorch (if PyTorch support available)"
TENSOR_NAME: blk.30.attn_k.weight # blk.30.attn_k.weight blk.2.ffn_down.weight # Tensor name, must be from models with the same foundation architecture for the differences to be valid.
COMPARISON_TYPE: absolute # "Comparison types, Default: mean, Choices: ['mean', 'median', 'absolute']"
COLOR_MODE: "false color viridis" # Color mode, Default: grayscale, Choices: ['grayscale', 'false color jet', 'false color viridis', 'binned coolwarm']
OUTPUT_NAME: comparison_absolute_llama.2.7b.base.q8.0.llama.2.7b.chat.q8.geotiff # Output file name for the heatmap. The heatmap will be saved to {OUTPUT_FOLDER}
OUTPUT_MODE: devs-overall # Output modes, Default: devs-overall, Choices: ['devs-overall', 'devs-rows', 'devs-cols'']