Card: hardware recipes (12/16/24/32 GB), shorter; RECIPES.md with memory measurements
Browse files17 unmodified lines181920212223242 unmodified lines272829303132333435363738394041421 unmodified line44454647484950515253545525 unmodified lines818283848586871 unmodified line89909192939495969798991006 unmodified lines1071081091101111121131141151161171185 unmodified lines1241251261271281291305 unmodified lines13613713813914014114217 unmodified lines# SenseNova-Loop-9B EXL3EXL3 quantizations of [sensenova/SenseNova-Loop-9B](https://huggingface.co/sensenova/SenseNova-Loop-9B) (revision `329a65f7`) for [ExLlamaV3](https://github.com/turboderp-org/exllamav3).Every branch includes the original vision tower in BF16; only the language model is quantized.> **Requires ExLlamaV3 with SenseNova Loop support**, in review upstream ([turboderp-org/exllamav3#609](https://github.com/turboderp-org/exllamav3/pull/609)).> Until it is released, install the fork (see [How to run](#how-to-run)). Stock ExLlamaV3 and TabbyAPI do not load this model yet.2 unmodified lines| GPU memory | Branch | Context, GPU only for the model | Context, GPU also runs your desktop ||---|---|---:|---:|| 12 GB | `4.0bpw` | 160k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-12gb.yml)) | 128k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-12gb-desktop.yml)) || 16 GB | `5.0bpw` | 268k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-16gb.yml)) | 232k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-16gb-desktop.yml)) || 24 GB | `6.0bpw` | 504k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-24gb.yml)) | 472k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-24gb-desktop.yml)) || 32 GB | `8.0bpw` | 512k, native max ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-32gb.yml)) | 512k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-32gb-desktop.yml)) |TabbyAPI configs with Q8 KV cache and the largest KV pool that fits, leaving about 0.75 GB free (plus 1 GB for the display in thedesktop configs) and room to encode one image of up to 4 MP. Variants for 4 parallel requests, a calculator for your exact card(desktop, text-only, other branches) and all measurements: **[Maxrio9/sensenova-loop-9b-exl3-recipes](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes)**.The 12 and 16 GB desktop configs ran unchanged in TabbyAPI, memory capped to the card, with a 4 MP image and a full-context prompt:all five planted facts found, inside the limit. Q8 KV cache costs no measurable quality (held-out KL 0.0015 with Q8 and with FP16, on 6.0 bpw).## Quants1 unmodified line| Branch | Bits per weight | Output head | Size | KL vs BF16 | Top-1 agreement ||---|---:|---:|---:|---:|---:|| [`8.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/8.0bpw) | 8.0 | 16-bit | 11.9 GB | 0.00016 | 99.7% || [`6.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/6.0bpw) | 6.0 | 8-bit | 9.2 GB | 0.0015 | 99.0% || [`5.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/5.0bpw) | 5.0 | 8-bit | 8.3 GB | 0.0030 | 98.6% || [`4.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/4.0bpw) | 4.0 | 8-bit | 7.5 GB | 0.0114 | 97.3% |Sizes include the 0.9 GB vision tower. KL is the mean divergence of each quant's next-token distribution from the unquantized model's, on 240held-out conversations generated by the model (152,145 scored tokens: code, chat, German, long context, math, reasoning, tool calls).For scale: two BF16 runs differ by 0.00032, a community FP8 checkpoint by 0.0036, the official 4-bit AWQ by 0.044.**8.0 bpw** is indistinguishable from BF16; **6.0** and **5.0 bpw** are closer to BF16 than FP8; **4.0 bpw** has about a quarter of the AWQ's KL.25 unmodified lines| 4.0bpw | 8k | 2,014 | 50.3 || 4.0bpw | 128k | 1,497 | 38.9 |With 8 parallel requests at 8k, total decode reaches 216 tok/s (8.0 bpw) and 261 tok/s (4.0 bpw).Only 8 of the 32 layers use full attention (the rest are gated delta-net), so the KV cache stays small at long context.## How to run1 unmodified lineInstall the fork (builds the CUDA extension, so it needs a CUDA toolkit matching your PyTorch), then download one branch:```bashpip install "git+https://github.com/Maxrio9/exllamav3.git@sensenova-loop"hf download Maxrio/SenseNova-Loop-9B-exl3 --revision 6.0bpw --local-dir SenseNova-Loop-9B-exl3-6.0bpw```**TabbyAPI** (tested at commit `4728158`): install TabbyAPI as usual, replace its ExLlamaV3 with the fork inside its environment(`pip install --no-deps --force-reinstall "git+https://github.com/Maxrio9/exllamav3.git@sensenova-loop"`), and use a config from[Pick your card](#pick-your-card) (add `model_dir` for your folder). Send `chat_template_kwargs: {"enable_thinking": true}` to switch thinking on; the reasoning comes back in `reasoning_content`.**Python:**6 unmodified linespath = "SenseNova-Loop-9B-exl3-6.0bpw"config = Config.from_directory(path)model = Model.from_config(config)cache = Cache(model, max_num_tokens = 32768)model.load()vision = Model.from_config(config, component = "vision") # optional, for image inputvision.load()tokenizer = Tokenizer.from_config(config)generator = Generator(model = model, cache = cache, tokenizer = tokenizer)hf_tok = AutoTokenizer.from_pretrained(path)image = vision.get_image_embeddings(tokenizer = tokenizer, image = Image.open("cat.png"))5 unmodified linesstop_conditions = [248044, 248046], completion_only = True))```For text only, skip the vision lines and the `embeddings` argument. For quantized KV cache in Python, pass`layer_type = CacheLayer_quant, k_bits = 8, v_bits = 8` to `Cache`. The base model's generation config uses temperature 1.0 and top-p 0.95.## What was checked5 unmodified lines## Limitations- Speculative decoding (the official MTP draft head) is not supported in ExLlamaV3 yet.- Long-context retrieval was checked with one five-fact prompt per recipe, not a full benchmark. Visual quality was compared against BF16 on 200 questions, not benchmarked against other models.- At 4.0 bpw, German and open-ended chat drift most; 6.0 bpw is the safer choice for those.17 unmodified lines18192021222324252 unmodified lines28293031323334353637383940414243441 unmodified line46474849505152535455565725 unmodified lines83848586878889909192931 unmodified line95969798991001011021031041051066 unmodified lines1131141151161171181191201211221231241251261271285 unmodified lines1341351361371381391405 unmodified lines14614714814915015115215317 unmodified lines# SenseNova-Loop-9B EXL3EXL3 quantizations of [sensenova/SenseNova-Loop-9B](https://huggingface.co/sensenova/SenseNova-Loop-9B) (revision `329a65f7`) for [ExLlamaV3](https://github.com/turboderp-org/exllamav3).Every branch includes the original vision tower in BF16 and the model's MTP head (4-bit) for speculative decoding: about 2.4x fastergeneration with the same output.> **Requires ExLlamaV3 with SenseNova Loop support**, in review upstream ([turboderp-org/exllamav3#609](https://github.com/turboderp-org/exllamav3/pull/609)).> Until it is released, install the fork (see [How to run](#how-to-run)). Stock ExLlamaV3 and TabbyAPI do not load this model yet.2 unmodified lines| GPU memory | Branch | Context, GPU only for the model | Context, GPU also runs your desktop ||---|---|---:|---:|| 12 GB | `4.0bpw` | 136k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-12gb.yml)) | 104k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-12gb-desktop.yml)) || 16 GB | `5.0bpw` | 232k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-16gb.yml)) | 204k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-16gb-desktop.yml)) || 24 GB | `6.0bpw` | 456k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-24gb.yml)) | 424k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-24gb-desktop.yml)) || 32 GB | `8.0bpw` | 512k, native max ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-32gb.yml)) | 512k ([config](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes/blob/main/configs/tabby-32gb-desktop.yml)) |TabbyAPI configs with MTP drafting, Q8 KV cache and the largest KV pool that fits, leaving about 0.75 GB free (plus 1 GB for the display in thedesktop configs) and room to encode one image of up to 4 MP. Variants for 4 parallel requests, a calculator for your exact card(desktop, text-only, other branches) and all measurements: **[Maxrio9/sensenova-loop-9b-exl3-recipes](https://github.com/Maxrio9/sensenova-loop-9b-exl3-recipes)**.The 16 GB desktop config ran unchanged in TabbyAPI, memory capped to the card, with a 4 MP image and a 205k-token promptthat fills its context: all five planted facts found, using 14.0 of the 14.2 GB allowed (the 12 and 16 GB configswithout MTP passed the same check earlier). Q8 KV cache costs no measurable quality (held-out KL 0.0015 with Q8 and with FP16, on 6.0 bpw).## Quants1 unmodified line| Branch | Bits per weight | Output head | Size | KL vs BF16 | Top-1 agreement ||---|---:|---:|---:|---:|---:|| [`8.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/8.0bpw) | 8.0 | 16-bit | 12.1 GB | 0.00016 | 99.7% || [`6.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/6.0bpw) | 6.0 | 8-bit | 9.3 GB | 0.0015 | 99.0% || [`5.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/5.0bpw) | 5.0 | 8-bit | 8.5 GB | 0.0030 | 98.6% || [`4.0bpw`](https://huggingface.co/Maxrio/SenseNova-Loop-9B-exl3/tree/4.0bpw) | 4.0 | 8-bit | 7.6 GB | 0.0114 | 97.3% |Sizes include the 0.9 GB vision tower and the 0.12 GB MTP head. KL is the mean divergence of each quant's next-token distribution from the unquantized model's, on 240held-out conversations generated by the model (152,145 scored tokens: code, chat, German, long context, math, reasoning, tool calls).For scale: two BF16 runs differ by 0.00032, a community FP8 checkpoint by 0.0036, the official 4-bit AWQ by 0.044.**8.0 bpw** is indistinguishable from BF16; **6.0** and **5.0 bpw** are closer to BF16 than FP8; **4.0 bpw** has about a quarter of the AWQ's KL.25 unmodified lines| 4.0bpw | 8k | 2,014 | 50.3 || 4.0bpw | 128k | 1,497 | 38.9 |With 8 parallel requests at 8k, total decode reaches 216 tok/s (8.0 bpw) and 261 tok/s (4.0 bpw). These numbers are without drafting.**With MTP drafting** (the recipe settings, 5.0 bpw on a DGX Spark, greedy): 22 tok/s plain becomes 64 tok/s on code, 57 on math withthinking, 58 when editing a code block and 34 on prose and chat, 2.38x on average over ten tasks, with token-identical output.The RTX PRO 4500 was not measured with MTP yet.Only 8 of the 32 layers use full attention (the rest are gated delta-net), so the KV cache stays small at long context.## How to run1 unmodified lineInstall the fork (builds the CUDA extension, so it needs a CUDA toolkit matching your PyTorch), then download one branch:```bashpip install "git+https://github.com/Maxrio9/exllamav3.git@sensenova-loop-mtp"hf download Maxrio/SenseNova-Loop-9B-exl3 --revision 6.0bpw --local-dir SenseNova-Loop-9B-exl3-6.0bpw```**TabbyAPI** (tested at commit `4728158`): install TabbyAPI as usual, replace its ExLlamaV3 with the fork inside its environment(`pip install --no-deps --force-reinstall "git+https://github.com/Maxrio9/exllamav3.git@sensenova-loop-mtp"`), and use a config from[Pick your card](#pick-your-card) (add `model_dir` for your folder). Send `chat_template_kwargs: {"enable_thinking": true}` to switch thinking on; the reasoning comes back in `reasoning_content`.**Python:**6 unmodified linespath = "SenseNova-Loop-9B-exl3-6.0bpw"config = Config.from_directory(path)model = Model.from_config(config)cache = Cache(model, max_num_tokens = 32768, max_history = 7) # max_history: room to roll back rejected draftsmodel.load()mtp = Model.from_config(config, component = "mtp") # optional, speculative decodingmtp_cache = Cache(mtp, max_num_tokens = 32768, max_history = 7)mtp.load()vision = Model.from_config(config, component = "vision") # optional, for image inputvision.load()tokenizer = Tokenizer.from_config(config)generator = Generator(model = model, cache = cache, tokenizer = tokenizer, draft_model = mtp, draft_cache = mtp_cache,num_draft_tokens = 4, hybrid_draft_tokens = 7, sparse_draft_head = 16384)hf_tok = AutoTokenizer.from_pretrained(path)image = vision.get_image_embeddings(tokenizer = tokenizer, image = Image.open("cat.png"))5 unmodified linesstop_conditions = [248044, 248046], completion_only = True))```For text only, skip the vision lines and the `embeddings` argument; without drafting, skip the `mtp` lines and the draft arguments. For quantized KV cache in Python, pass`layer_type = CacheLayer_quant, k_bits = 8, v_bits = 8` to `Cache`. The base model's generation config uses temperature 1.0 and top-p 0.95.## What was checked5 unmodified lines## Limitations- MTP speed was measured on a DGX Spark only; on GPUs with faster memory the speedup can differ. Bit-identical greedy output withdrafting needs `EXL3_INT8_GEMV=0` and an FP32 delta-net state (the recipes set the latter); otherwise rare near-ties can resolve differently.- Long-context retrieval was checked with one five-fact prompt per recipe, not a full benchmark. Visual quality was compared against BF16 on 200 questions, not benchmarked against other models.- At 4.0 bpw, German and open-ended chat drift most; 6.0 bpw is the safer choice for those.
README.md+30-19