-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
ggml-quants : ternary packing for TriLMs and BitNet b1.58 #8151
Commits on Jun 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bd80749 - Browse repository at this point
Copy the full SHA bd80749View commit details -
ggml-quants : faster 1.625 bpw AVX2 vec_dot
Not using a lookup table anymore makes it match q4_0 speed. * gguf-py : fix formatting * llama : remove spaces on empty line
Configuration menu - View commit details
-
Copy full SHA for 7ef4254 - Browse repository at this point
Copy the full SHA 7ef4254View commit details -
ggml-quants : substract 1 when back in epi8
This makes the 1.625 bpw type go faster than q4_0. Still not the fastest.
Configuration menu - View commit details
-
Copy full SHA for 48b73b8 - Browse repository at this point
Copy the full SHA 48b73b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef1e345 - Browse repository at this point
Copy the full SHA ef1e345View commit details -
Configuration menu - View commit details
-
Copy full SHA for 638ad52 - Browse repository at this point
Copy the full SHA 638ad52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9465ec6 - Browse repository at this point
Copy the full SHA 9465ec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89dc3b2 - Browse repository at this point
Copy the full SHA 89dc3b2View commit details -
convert-hf : simplify BitNet pre-quantization
This still results in the exact same tensor weights and scales, but it reveals some weirdness in the current algorithm.
Configuration menu - View commit details
-
Copy full SHA for 961e293 - Browse repository at this point
Copy the full SHA 961e293View commit details -
convert-hf : allow converting the weird BitNet 1.3B
Its FFN size is 5460 which is not convenient. The offending tensors are kept in F16, which makes the final model 5.01 bpw.
Configuration menu - View commit details
-
Copy full SHA for 0996149 - Browse repository at this point
Copy the full SHA 0996149View commit details
Commits on Jun 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bfd2f21 - Browse repository at this point
Copy the full SHA bfd2f21View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec50944 - Browse repository at this point
Copy the full SHA ec50944View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fbd593 - Browse repository at this point
Copy the full SHA 8fbd593View commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd3e62a - Browse repository at this point
Copy the full SHA dd3e62aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79a278e - Browse repository at this point
Copy the full SHA 79a278eView commit details
Commits on Jul 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 77b8f84 - Browse repository at this point
Copy the full SHA 77b8f84View commit details
Commits on Jul 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 560873f - Browse repository at this point
Copy the full SHA 560873fView commit details -
Same optimization as for TQ2_0 by offsetting the sum instead of the weights. This makes TQ1_0 almost as fast as Q8_0 on AVX2.
Configuration menu - View commit details
-
Copy full SHA for e971957 - Browse repository at this point
Copy the full SHA e971957View commit details
Commits on Aug 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a6dd699 - Browse repository at this point
Copy the full SHA a6dd699View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5417089 - Browse repository at this point
Copy the full SHA 5417089View commit details -
ggml : avoid directly using vmlal_high_s8, for 32-bit ARM compat
The compiler seems smart enough to use the same instruction even when using vget_high_s8 instead.
Configuration menu - View commit details
-
Copy full SHA for 45719a2 - Browse repository at this point
Copy the full SHA 45719a2View commit details
Commits on Aug 3, 2024
-
* llama : remove the separate scale tensors of BitNet b1.58 They won't be needed, since the remaining ternary quant types have built-in scales.
Configuration menu - View commit details
-
Copy full SHA for 04eec58 - Browse repository at this point
Copy the full SHA 04eec58View commit details -
Configuration menu - View commit details
-
Copy full SHA for f034aa1 - Browse repository at this point
Copy the full SHA f034aa1View commit details
Commits on Aug 7, 2024
-
ggml-quants : allow using vdotq_s32 in TQ2_0 vec_dot
Not yet tested on harware which supports it, might not work or might not even compile. But also it might. It should make the performance better on recent ARM CPUs. * ggml-quants : remove comment about possible format change of TQ2_0 Making it slightly more convenient for AVX512 but less convenient for everything else is not worth the trouble.
Configuration menu - View commit details
-
Copy full SHA for 96b3d41 - Browse repository at this point
Copy the full SHA 96b3d41View commit details
Commits on Aug 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d911cd1 - Browse repository at this point
Copy the full SHA d911cd1View commit details
Commits on Aug 12, 2024
-
gguf-py : Numpy (de)quantization for TQ1_0 and TQ2_0
* ggml-quants : use roundf instead of nearest_int for TQ1_0 and TQ2_0 This does not change anything for ternary models, since their values should never end up being in halfway cases anyway.
Configuration menu - View commit details
-
Copy full SHA for 3a0bf17 - Browse repository at this point
Copy the full SHA 3a0bf17View commit details
Commits on Aug 13, 2024
-
convert : allow direct conversion to TQ1_0 and TQ2_0
The token embeddings and output tensors are kept in F16 to allow quantizing them to Q4_K and Q6_K with llama-quantize. * llama : handle fallback for TQ1_0 and TQ2_0 with Q4_0 Q4_0 is not completely symmetric (so not lossless for ternary models), but it should be good enough.
Configuration menu - View commit details
-
Copy full SHA for 895004f - Browse repository at this point
Copy the full SHA 895004fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69f7726 - Browse repository at this point
Copy the full SHA 69f7726View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82b2404 - Browse repository at this point
Copy the full SHA 82b2404View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35cc556 - Browse repository at this point
Copy the full SHA 35cc556View commit details
Commits on Aug 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cb6d996 - Browse repository at this point
Copy the full SHA cb6d996View commit details
Commits on Sep 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7f3a619 - Browse repository at this point
Copy the full SHA 7f3a619View commit details -
ggml ; remove unused ggml_mul special case
It would otherwise conflict with the more general optimization coming with Mamba-2. * ggml : handle TQ1_0 and TQ2_0 in dequantization-based operators
Configuration menu - View commit details
-
Copy full SHA for 8d61607 - Browse repository at this point
Copy the full SHA 8d61607View commit details -
test-backend-ops : add TQ1_0 and TQ2_0 comments for later
Not yet adding uncommented, because some backends like SYCL and Metal do not properly handle unknown types in supports_op for GGML_OP_MUL_MAT. (and Metal also doesn't handle it with GGML_OP_GET_ROWS) Support for TQ1_0 and TQ2_0 for other backends than CPU will be added in follow-up pull requests.
Configuration menu - View commit details
-
Copy full SHA for 75b3a09 - Browse repository at this point
Copy the full SHA 75b3a09View commit details