Commit 709ea7d
committed
mamba : stop abusing attention metadata
This breaks existing converted-to-GGUF Mamba models,
but will allow supporting mixed architectures like MambaFormer
without needing to break Mamba models.
This will also allow changing the size of Mamba's states
without having to reconvert models in the future.
(e.g. using something else than d_conv - 1 columns for the conv_states
will not require breaking existing converted Mamba models again)
* gguf-py : add new KV metadata key-value pairs for Mamba
* llama : add new metadata key-value pairs for Mamba
* llama : guard against divisions by zero when n_head is 0
* mamba : rename "unlimited" KV cache property to "recurrent"1 parent 919d79f commit 709ea7d
File tree
4 files changed
+128
-49
lines changed- gguf-py/gguf
4 files changed
+128
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
| 1860 | + | |
1860 | 1861 | | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
1861 | 1868 | | |
1862 | 1869 | | |
1863 | 1870 | | |
1864 | 1871 | | |
1865 | 1872 | | |
1866 | 1873 | | |
1867 | 1874 | | |
1868 | | - | |
| 1875 | + | |
1869 | 1876 | | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
1870 | 1881 | | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
1875 | 1882 | | |
1876 | 1883 | | |
1877 | 1884 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
726 | 732 | | |
727 | 733 | | |
728 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
729 | 741 | | |
730 | 742 | | |
731 | 743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
385 | 397 | | |
386 | 398 | | |
387 | 399 | | |
| |||
0 commit comments