initial commit
Browse files- .gitattributes +3 -0
- README.md +104 -3
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
imatrix-*.dat filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,104 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
quantized_by: ubergarm
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
base_model: inclusionAI/Ling-1T
|
| 5 |
+
license: mit
|
| 6 |
+
base_model_relation: quantized
|
| 7 |
+
tags:
|
| 8 |
+
- imatrix
|
| 9 |
+
- bailing_moe
|
| 10 |
+
- conversational
|
| 11 |
+
- ik_llama.cpp
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
## `ik_llama.cpp` imatrix Quantizations of inclusionAI/Ling-1T
|
| 15 |
+
This quant collection **REQUIRES** [ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp/) fork to support the ik's latest SOTA quants and optimizations! Do **not** download these big files and expect them to run on mainline vanilla llama.cpp, ollama, LM Studio, KoboldCpp, etc!
|
| 16 |
+
|
| 17 |
+
*NOTE* `ik_llama.cpp` can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants.
|
| 18 |
+
|
| 19 |
+
Some of ik's new quants are supported with [Nexesenex/croco.cpp](https://github.com/Nexesenex/croco.cpp) fork of KoboldCPP with Windows builds for CUDA 12.9. Also check for [Windows builds by Thireus here.](https://github.com/Thireus/ik_llama.cpp/releases) which have been CUDA 12.8.
|
| 20 |
+
|
| 21 |
+
These quants provide best in class perplexity for the given memory footprint.
|
| 22 |
+
|
| 23 |
+
## Big Thanks
|
| 24 |
+
Shout out to Wendell and the **Level1Techs** crew, the community [Forums](https://forum.level1techs.com/t/deepseek-deep-dive-r1-at-home/225826), [YouTube Channel](https://www.youtube.com/@Level1Techs)! **BIG thanks** for providing **BIG hardware** expertise and access to run these experiments and make these great quants available to the community!!!
|
| 25 |
+
|
| 26 |
+
Also thanks to all the folks in the quanting and inferencing community on [BeaverAI Club Discord](https://huggingface.co/BeaverAI) and on [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/) for tips and tricks helping each other run, test, and benchmark all the fun new models!
|
| 27 |
+
|
| 28 |
+
## Quant Collection
|
| 29 |
+
Perplexity computed against *wiki.test.raw*.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+
This one is just a test quant for baseline perplexity comparison:
|
| 34 |
+
* `Q8_0` 989.678 GiB (8.504 BPW)
|
| 35 |
+
- Final estimate: PPL = TODO
|
| 36 |
+
|
| 37 |
+
## smol-IQ4_KSS TODO
|
| 38 |
+
Final estimate: PPL = TODO
|
| 39 |
+
|
| 40 |
+
## smol-IQ2_KS TODO
|
| 41 |
+
Final estimate: PPL = TODO
|
| 42 |
+
|
| 43 |
+
Should hopefully fit in 249.38 GiB RAM + 14.3 GiB VRAM + kv-cache/context...🤞
|
| 44 |
+
|
| 45 |
+
Leaving the `attn.*`/first 4 dense layers/shexp at full q8_0 would take about 20.1 GiB VRAM, might do some other quants like that for folks with more VRAM.
|
| 46 |
+
|
| 47 |
+
<details>
|
| 48 |
+
|
| 49 |
+
<summary>👈 Secret Recipe</summary>
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
custom="
|
| 53 |
+
# 80 Repeating Layers [0-79]
|
| 54 |
+
|
| 55 |
+
# Attention
|
| 56 |
+
blk\..*\.attn_qkv.*=iq6_k
|
| 57 |
+
blk\..*\.attn_output.*=iq6_k
|
| 58 |
+
|
| 59 |
+
# First 4 Dense Layers [0-3]
|
| 60 |
+
blk\..*\.ffn_down\.weight=iq5_ks
|
| 61 |
+
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
|
| 62 |
+
|
| 63 |
+
# Shared Expert Layers [3-79]
|
| 64 |
+
blk\..*\.ffn_down_shexp\.weight=iq5_ks
|
| 65 |
+
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
|
| 66 |
+
|
| 67 |
+
# Routed Experts Layers [3-79]
|
| 68 |
+
blk\..*\.ffn_down_exps\.weight=iq2_ks
|
| 69 |
+
blk\..*\.ffn_(gate|up)_exps\.weight=iq2_ks
|
| 70 |
+
|
| 71 |
+
# Non-Repeating Layers
|
| 72 |
+
token_embd\.weight=iq4_k
|
| 73 |
+
output\.weight=iq6_k
|
| 74 |
+
"
|
| 75 |
+
|
| 76 |
+
custom=$(
|
| 77 |
+
echo "$custom" | grep -v '^#' | \
|
| 78 |
+
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
numactl -N ${SOCKET} -m ${SOCKET} \
|
| 82 |
+
./build/bin/llama-quantize \
|
| 83 |
+
--custom-q "$custom" \
|
| 84 |
+
--imatrix /mnt/data/models/ubergarm/Ling-1T-GGUF/imatrix-Ling-1T-Q8_0.dat \
|
| 85 |
+
/mnt/data/models/ubergarm/Ling-1T-GGUF/Ling-1T-BF16-00001-of-00046.gguf \
|
| 86 |
+
/mnt/data/models/ubergarm/Ling-1T-GGUF/Ling-1T-smol-IQ2_KS.gguf
|
| 87 |
+
IQ2_KS \
|
| 88 |
+
192
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
</details>
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
## Quick Start
|
| 95 |
+
```bash
|
| 96 |
+
echo TODO
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## References
|
| 100 |
+
* [ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp)
|
| 101 |
+
* [Getting Started Guide (already out of date lol)](https://github.com/ikawrakow/ik_llama.cpp/discussions/258)
|
| 102 |
+
* [ubergarm-imatrix-calibration-corpus-v02.txt](https://gist.github.com/ubergarm/edfeb3ff9c6ec8b49e88cdf627b0711a?permalink_comment_id=5682584#gistcomment-5682584)
|
| 103 |
+
* [ik_llama.cpp PR833](https://github.com/ikawrakow/ik_llama.cpp/pull/833)
|
| 104 |
+
* [mainline llama.cpp PR16063](https://github.com/ggml-org/llama.cpp/pull/16063)
|