Llamacpp imatrix Quantizations of GigaChat3-702B-A36B-preview by ai-sage
Using llama.cpp release b7120 for quantization.
Original model: https://huggingface.co/ai-sage/GigaChat3-702B-A36B-preview
All quants made using imatrix option with dataset from here combined with a subset of combined_all_small.parquet from Ed Addario here
Run them in LM Studio
Run them directly with llama.cpp, or any other llama.cpp based project
Prompt format
<s>developer system<|role_sep|>
<role_description>
Description of the roles available in the dialog.
`developer system`
A message added by Sber before the main dialog. It has the highest priority and sets global, non-overridable conditions (for example, conversation rules, the safety policy, the assistant's overall response style, etc.).
`system`
A system instruction added by developers or by the user, but with a lower priority than `developer system`. It usually describes the assistant's instructions, a specific response style, and other conditions for this particular dialog.
`user`
A message or request from the user. The assistant follows it if it does not conflict with higher-priority instructions (see <instruction_priority>).
`user memory`
A sequence of the most up-to-date long-term facts about the user at the time of their request, presented as a JSON list of strings. Facts are listed in chronological order, meaning newer facts are appended to the end of the sequence. When facts are changed or deleted, records of previous facts remain in the sequence. The assistant saves facts using a function and uses them in accordance with the <memory_guidelines> block below.
`added files`
Metadata about files available for use in the dialog, presented in JSON format. It contains the following keys: id (a unique file identifier), name (file name), type (file type).
`assistant`
The assistant's reply to the user's request. If the system instruction or the user does not set additional rules for `assistant`, this reply must comply with the instructions in the <assistant_guidelines> block below. The list of functions available to call is contained in `function descriptions`. The name of the required function and its arguments will be generated next by the `function call` role. In its replies, the assistant follows the instructions in accordance with <instruction_priority>.
`function descriptions`
Function descriptions in TypeScript format. A function is a special tool (or a set of instructions) that the assistant can call to perform specific actions, computations, or obtain data needed to solve the user's task. Each function description contains blocks with the name, description, and arguments. Sometimes the description contains separate blocks with return parameters and usage examples that illustrate the correct call and arguments.
`function call`
The function that `assistant` calls based on the dialog context, and its arguments. The function is invoked in strict accordance with the instructions in the <function_usage> block.
`function result`
The result of the last function call.
</role_description>
<available_modalities>
The assistant can work with the following modalities: text, available functions.
</available_modalities>
<instruction_priority>
If instructions from different roles conflict within the dialog context, observe the following priorities:
`developer system` > `system` > `user` > `function descriptions` > `function result` > `user memory`
</instruction_priority>
<function_usage>
Basic instructions for working with functions.
Only call those functions that are described in `function descriptions`.
Call available functions when, according to their description, such a call will help provide a more complete and/or accurate answer to the user's request. Fill in function arguments using information from the dialog context. If a function could help answer the request but a required argument is missing from the context, ask the user for the missing data before calling the function. If a necessary function is unavailable or an error occurs, briefly inform the user and, if possible, suggest an alternative.
</function_usage>
<memory_guidelines>
Rules for using facts in long-term memory:
If there is no message under the `user memory` role in the dialog, this is equivalent to the absence of long-term facts about the user in memory. In that case, information about the user is limited to the current dialog, and no new facts should be saved.
</memory_guidelines>
<assistant_guidelines>
You are a helpful assistant.
# Instructions
- Strictly follow the instruction priority.
- Maintain a logical chain of reasoning when answering the user's question.
- For complex questions (for example, STEM), try to answer in detail unless the system message or dialog context limits the response length.
- Be helpful, truthful, and avoid unsafe or prohibited content in your responses.
- Try to reply in the language in which the user asked their question.
</assistant_guidelines>
A dialog will follow below.
The dialog may include various roles described in the <role_description> block.
Each turn begins with the role name and a special token that marks the end of the role's full name, and ends with a special end-of-turn token.
Your task is to continue the dialog from the last specified role in accordance with the dialog context.<|message_sep|>
system<|role_sep|>
{system_prompt}<|message_sep|>
user<|role_sep|>
{prompt}<|message_sep|>
assistant<|role_sep|>
Download a file (not the whole branch) from below:
| Filename | Quant type | File Size | Split | Description |
|---|---|---|---|---|
| GigaChat3-702B-A36B-preview-Q8_0.gguf | Q8_0 | 746.26GB | true | Extremely high quality, generally unneeded but max available quant. |
| GigaChat3-702B-A36B-preview-Q6_K.gguf | Q6_K | 577.60GB | true | Very high quality, near perfect, recommended. |
| GigaChat3-702B-A36B-preview-Q5_K_M.gguf | Q5_K_M | 499.97GB | true | High quality, recommended. |
| GigaChat3-702B-A36B-preview-Q4_1.gguf | Q4_1 | 440.39GB | true | Legacy format, similar performance to Q4_K_S but with improved tokens/watt on Apple silicon. |
| GigaChat3-702B-A36B-preview-Q4_K_M.gguf | Q4_K_M | 427.22GB | true | Good quality, default size for most use cases, recommended. |
| GigaChat3-702B-A36B-preview-Q4_0.gguf | Q4_0 | 403.99GB | true | Legacy format, offers online repacking for ARM and AVX CPU inference. |
| GigaChat3-702B-A36B-preview-IQ4_NL.gguf | IQ4_NL | 397.62GB | true | Similar to IQ4_XS, but slightly larger. Offers online repacking for ARM CPU inference. |
| GigaChat3-702B-A36B-preview-IQ4_XS.gguf | IQ4_XS | 376.07GB | true | Decent quality, smaller than Q4_K_S with similar performance, recommended. |
| GigaChat3-702B-A36B-preview-Q3_K_XL.gguf | Q3_K_XL | 334.52GB | true | Uses Q8_0 for embed and output weights. Lower quality but usable, good for low RAM availability. |
| GigaChat3-702B-A36B-preview-Q3_K_L.gguf | Q3_K_L | 333.72GB | true | Lower quality but usable, good for low RAM availability. |
| GigaChat3-702B-A36B-preview-Q3_K_M.gguf | Q3_K_M | 321.08GB | true | Low quality. |
| GigaChat3-702B-A36B-preview-IQ3_M.gguf | IQ3_M | 321.03GB | true | Medium-low quality, new method with decent performance comparable to Q3_K_M. |
| GigaChat3-702B-A36B-preview-Q3_K_S.gguf | Q3_K_S | 306.00GB | true | Low quality, not recommended. |
| GigaChat3-702B-A36B-preview-IQ3_XS.gguf | IQ3_XS | 289.09GB | true | Lower quality, new method with decent performance, slightly better than Q3_K_S. |
| GigaChat3-702B-A36B-preview-IQ3_XXS.gguf | IQ3_XXS | 278.87GB | true | Lower quality, new method with decent performance, comparable to Q3 quants. |
| GigaChat3-702B-A36B-preview-Q2_K_L.gguf | Q2_K_L | 248.33GB | true | Uses Q8_0 for embed and output weights. Very low quality but surprisingly usable. |
| GigaChat3-702B-A36B-preview-Q2_K.gguf | Q2_K | 247.43GB | true | Very low quality but surprisingly usable. |
| GigaChat3-702B-A36B-preview-IQ2_M.gguf | IQ2_M | 223.02GB | true | Relatively low quality, uses SOTA techniques to be surprisingly usable. |
| GigaChat3-702B-A36B-preview-IQ2_S.gguf | IQ2_S | 196.56GB | true | Low quality, uses SOTA techniques to be usable. |
| GigaChat3-702B-A36B-preview-IQ2_XS.gguf | IQ2_XS | 195.64GB | true | Low quality, uses SOTA techniques to be usable. |
| GigaChat3-702B-A36B-preview-IQ2_XXS.gguf | IQ2_XXS | 169.96GB | true | Very low quality, uses SOTA techniques to be usable. |
| GigaChat3-702B-A36B-preview-IQ1_M.gguf | IQ1_M | 152.56GB | true | Extremely low quality, not recommended. |
| GigaChat3-702B-A36B-preview-IQ1_S.gguf | IQ1_S | 146.36GB | true | Extremely low quality, not recommended. |
Embed/output weights
Some of these quants (Q3_K_XL, Q4_K_L etc) are the standard quantization method with the embeddings and output weights quantized to Q8_0 instead of what they would normally default to.
Downloading using huggingface-cli
Click to view download instructions
First, make sure you have hugginface-cli installed:
pip install -U "huggingface_hub[cli]"
Then, you can target the specific file you want:
huggingface-cli download bartowski/ai-sage_GigaChat3-702B-A36B-preview-GGUF --include "ai-sage_GigaChat3-702B-A36B-preview-Q4_K_M.gguf" --local-dir ./
If the model is bigger than 50GB, it will have been split into multiple files. In order to download them all to a local folder, run:
huggingface-cli download bartowski/ai-sage_GigaChat3-702B-A36B-preview-GGUF --include "ai-sage_GigaChat3-702B-A36B-preview-Q8_0/*" --local-dir ./
You can either specify a new local-dir (ai-sage_GigaChat3-702B-A36B-preview-Q8_0) or download them all in place (./)
ARM/AVX information
Previously, you would download Q4_0_4_4/4_8/8_8, and these would have their weights interleaved in memory in order to improve performance on ARM and AVX machines by loading up more data in one pass.
Now, however, there is something called "online repacking" for weights. details in this PR. If you use Q4_0 and your hardware would benefit from repacking weights, it will do it automatically on the fly.
As of llama.cpp build b4282 you will not be able to run the Q4_0_X_X files and will instead need to use Q4_0.
Additionally, if you want to get slightly better quality for , you can use IQ4_NL thanks to this PR which will also repack the weights for ARM, though only the 4_4 for now. The loading time may be slower but it will result in an overall speed incrase.
Click to view Q4_0_X_X information (deprecated
I'm keeping this section to show the potential theoretical uplift in performance from using the Q4_0 with online repacking.
Click to view benchmarks on an AVX2 system (EPYC7702)
| model | size | params | backend | threads | test | t/s | % (vs Q4_0) |
|---|---|---|---|---|---|---|---|
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp512 | 204.03 ± 1.03 | 100% |
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp1024 | 282.92 ± 0.19 | 100% |
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | pp2048 | 259.49 ± 0.44 | 100% |
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg128 | 39.12 ± 0.27 | 100% |
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg256 | 39.31 ± 0.69 | 100% |
| qwen2 3B Q4_0 | 1.70 GiB | 3.09 B | CPU | 64 | tg512 | 40.52 ± 0.03 | 100% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp512 | 301.02 ± 1.74 | 147% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp1024 | 287.23 ± 0.20 | 101% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | pp2048 | 262.77 ± 1.81 | 101% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg128 | 18.80 ± 0.99 | 48% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg256 | 24.46 ± 3.04 | 83% |
| qwen2 3B Q4_K_M | 1.79 GiB | 3.09 B | CPU | 64 | tg512 | 36.32 ± 3.59 | 90% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp512 | 271.71 ± 3.53 | 133% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp1024 | 279.86 ± 45.63 | 100% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | pp2048 | 320.77 ± 5.00 | 124% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg128 | 43.51 ± 0.05 | 111% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg256 | 43.35 ± 0.09 | 110% |
| qwen2 3B Q4_0_8_8 | 1.69 GiB | 3.09 B | CPU | 64 | tg512 | 42.60 ± 0.31 | 105% |
Q4_0_8_8 offers a nice bump to prompt processing and a small bump to text generation
Which file should I choose?
Click here for details
A great write up with charts showing various performances is provided by Artefact2 here
The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have.
If you want your model running as FAST as possible, you'll want to fit the whole thing on your GPU's VRAM. Aim for a quant with a file size 1-2GB smaller than your GPU's total VRAM.
If you want the absolute maximum quality, add both your system RAM and your GPU's VRAM together, then similarly grab a quant with a file size 1-2GB Smaller than that total.
Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'.
If you don't want to think too much, grab one of the K-quants. These are in format 'QX_K_X', like Q5_K_M.
If you want to get more into the weeds, you can check out this extremely useful feature chart:
But basically, if you're aiming for below Q4, and you're running cuBLAS (Nvidia) or rocBLAS (AMD), you should look towards the I-quants. These are in format IQX_X, like IQ3_M. These are newer and offer better performance for their size.
These I-quants can also be used on CPU, but will be slower than their K-quant equivalent, so speed vs performance is a tradeoff you'll have to decide.
Credits
Thank you kalomaze and Dampf for assistance in creating the imatrix calibration dataset.
Thank you ZeroWw for the inspiration to experiment with embed/output.
Thank you to LM Studio for sponsoring my work.
Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski
- Downloads last month
- 1,685
Model tree for bartowski/ai-sage_GigaChat3-702B-A36B-preview-GGUF
Base model
ai-sage/GigaChat3-702B-A36B-preview-bf16