-
Notifications
You must be signed in to change notification settings - Fork 13.6k
imatrix: calculate activation-based statistics for new format (GGUF) imatrices #14891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
EAddario
wants to merge
91
commits into
ggml-org:master
Choose a base branch
from
EAddario:imatrix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
09bc7c2
Use activations to calculate the stats
EAddario 2097f03
Refactor variable names
EAddario 78ddb47
Fix problem up when GGUF does not have in_sum
EAddario 9744a4a
Determine calculation mode
EAddario cce514a
Compute entropy for activations
EAddario b7fb362
Compute cosine similarity based on activations
EAddario 9b841eb
Compute l2 norm
EAddario ee2509f
Adjust threshold
EAddario fc8f925
Update table display
EAddario 4c01f51
Remove inactive
EAddario a32a2ec
Reformat report layout
EAddario 4d1325e
Refactor variables
EAddario 5324558
Update table layout
EAddario fce05aa
Refactor lambda into compute_tensor_averages() function
EAddario be60469
Refactor function names
EAddario a6155a8
Add compute_layer_statistics() function
EAddario 2117c4e
Update aggregated statistic report layout
EAddario 90cb1be
Minor cosmetic changes
EAddario f1c2a4c
Fix printing l2 norm when calc_mode = 1
EAddario c39c4e2
Refactor variable name
EAddario adbff66
Merge branch 'master' into imatrix
EAddario 5e40cf4
Do not resize if in_sum is null
EAddario b373934
Compute aggregated (per layer) l2 norm
EAddario 906548a
Update aggregated sum of squared activations per layer
EAddario aea9b31
Make ZD Score two-tailed
EAddario 49996a1
Refactor variable names
EAddario 4c3fea8
Update report layout
EAddario 88854c9
Refactor legacy mode
EAddario 030ed3c
Merge branch 'master' into imatrix
EAddario c7959ed
Merge branch 'master' into imatrix
EAddario 3e9d53c
Refactor variable names
EAddario e0d6471
Reverse conditional logic to match convention
EAddario dadd90e
Rename report heading
EAddario 5bb2def
Add --activation-statistics parameter
EAddario c5ecdaa
Add Euclidean–Cosine Score (ECS)
EAddario 59af503
Update README.md
EAddario 9467963
Merge branch 'master' into imatrix
EAddario 6fe51e1
Fix typo in ECS formula
EAddario dcac206
Add --activation-statistics logic to avoid doubling the imatrix size …
EAddario 89051cd
Update README.md
EAddario 2756617
Merge branch 'master' into imatrix
EAddario 42bfe3b
Update stats output sort based on imatrix type
EAddario 240a965
Update README.md
EAddario 8589ef4
Update README.md
EAddario 030ec53
Remove unnecessary include
EAddario d4b0d89
Fix return type bug
EAddario e3149a2
Use the corresponding size
EAddario 4a487ea
Use { and } around the conditionally-executed statement
EAddario 97d839c
Using one line per variable definition
EAddario d19e6c9
Use { and } around the conditionally-executed statement
EAddario 12607d3
Use { and } around single line for statement
EAddario a96013f
Define one variable per line and refactor names
EAddario 2e80323
Use { and } around conditionally-executed single line statements
EAddario 44ea7dd
Change statement order
EAddario f6934b9
Merge branch 'imatrix' of https://github.com/EAddario/llama.cpp into …
EAddario 1f72bc1
Avoid using if statements with initialiser
EAddario 630750f
Validate number of elements if in_sum is present
EAddario 5aca256
Merge branch 'master' into imatrix
EAddario 3e26364
Clarify the nature of the calculated cosine similarity
EAddario 69b351b
Add --output-format to usage
EAddario 6371902
Add --output-format to usage
EAddario 70dd25b
Merge branch 'master' into imatrix
EAddario 8f1aa78
Remove activation_statistics() option
EAddario 8d0e276
Update README.md
EAddario 7448bdb
Merge branch 'master' into imatrix
EAddario 0c3a019
Merge branch 'master' into imatrix
EAddario 63f3449
Merge branch 'master' into imatrix
EAddario 193d5bb
Merge branch 'master' into imatrix
EAddario 5932eef
Merge branch 'master' into imatrix
EAddario a28ee30
Merge branch 'master' into imatrix
EAddario bc38936
Merge branch 'master' into imatrix
EAddario 252c4b7
Merge branch 'master' into imatrix
EAddario 09ec0c0
Merge branch 'master' into imatrix
EAddario c81f7cd
Merge branch 'master' into imatrix
EAddario 8fd2aca
Merge branch 'master' into imatrix
EAddario af3b6ac
Fix legacy_mode getting overwritten on each tensor bug
EAddario c9a0874
Clamp CosSim to [-1, 1] to avoid float drift
EAddario 637e674
Avoid division by zero on zero-count matrices
EAddario 683ef8d
Fill zeros for experts with zero counts to preserve shape
EAddario dc4a04b
Adjust size calculation and change fallback value to 0.0f
EAddario 0b0381c
Merge Cosine Similarity and L2 Norm computation into single loop
EAddario b5068df
Minor refactoring
EAddario 92a42ba
Type refactoring
EAddario ab01506
Minor refactoring
EAddario 86fabce
Clamp values
EAddario 6ff0a79
Minor stats report cosmetic changes
EAddario 2a6f5d7
Refactor variable names
EAddario 006e7ef
Improve compute_vector_statistics() processing of mismatched tensor s…
EAddario 7d8819f
Improve compute_layer_statistics() processing of mismatched tensor sizes
EAddario ce046dc
Save statistics to imatrix
EAddario 8bd9d87
Merge branch 'master' into imatrix
EAddario File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.