๐Ÿฌ TOFFEE

Tensor-Optimized Quantization Engine

This repo contains TOFFEE quants for InternScience/Sage-A1.5

โš™๏ธ The TOFFEE Architecture

๐Ÿ” Activation-Driven Imatrix

Captures per-tensor activation variance during forward passes and uses it to assign precision per tensor. Critical layers get more bits; redundant layers get aggressively crushed.

๐ŸŽฏ MoE Router-Weighted Scaling

Mixes MoE router probabilities into activation scales, so "hot" experts are fiercely protected while "cold" experts are quantized down hard within the same tensor block.

๐Ÿ—๏ธ Architecture-Agnostic Mapping

Dynamically reads HuggingFace modules and the F16 GGUF to map tensors โ€” no hardcoded regex. Works on Llama, DeepSeek, Qwen hybrids, and custom SSM/MoE architectures.

๐Ÿ–ฅ๏ธ Consumer VRAM Safe

Enforces a per-process VRAM fraction at the CUDA allocator level, so imatrix harvesting runs on 12 GB laptop GPUs without OOMing mid-pass.

Tier Target Quality Target Size Middle Layer Strategy
๐Ÿฌ qualityQ8 Match~21 GBIQ4_XS
โš–๏ธ balancedQ6 Match~24 GBQ5_K
๐Ÿ“ฆ compactQ4 Match~16 GBQ3_K
๐Ÿš€ miniQ2 Match~12 GBIQ2_XXS
๐Ÿ’Ž nanoQ2 Match~8 GBIQ2_XXS

๐Ÿš€ Usage

Quantize a model with an activation-driven imatrix:

$ python -m toffee quant --model ./Sage-A1.5 --output-dir ./out \
  --tier quality --samples 2075 --gguf-quant Q4_K_M

๐Ÿ“š Credits & Foundations

๐Ÿ‘‰ APEX Quantization Method
Ettore Di Giacinto & Richard Palethorpe (LocalAI Team). TOFFEE builds on APEX's layer-wise precision gradients and MoE-aware tensor classification with dynamic, data-driven imatrix calibration.

๐Ÿ‘‰ Bartowski and Lamim
For the semantic imatrix calibration dataset that powers TOFFEE's activation scaling.

๐Ÿ‘‰ llama.cpp
Georgi Gerganov and contributors for the foundational inference and quantization engine.

๐Ÿ‘‰ HuggingFace Accelerate
For the init_empty_weights() context manager that makes the 0-RAM "Ghost Model" possible on consumer hardware.

๐Ÿ‘‰ ONYX
TOFFEE ports ONYX's imatrix passes and Conv-aware reduction logic for architecture-agnostic quantization.

Support the Project

Fuel the TOFFEE โ€” send some crypto my way! No coffee here either, but a pink lemonade would be fire! ๐Ÿ”ฅ

github.com/damien1141/toffee

recommended sampling parameters:

--temp 0.85 --top-p 0.95 --top-k 40 --min-p 0.05 --repeat-penalty 1.1 --presence-penalty 0.0
Downloads last month
1,378
GGUF
Model size
36B params
Architecture
qwen35moe
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for el4/Sage-A1.5-TOFFEE-GGUF

Quantized
(41)
this model

Collection including el4/Sage-A1.5-TOFFEE-GGUF