muQuanta

non-profit
Activity Feed

AI & ML interests

Independant research (Maths, ML, IT & more...)

Recent Activity

muquanta-axel-v17  updated a Space 4 days ago
muquanta/README
muquanta-axel-v17  published a Space 5 days ago
muquanta/README
View all activity

muquanta-axel-v17 
posted an update about 20 hours ago
view post
Post
35
v1.1 of my integer-only Mistral models 🔢

These models run with **no floating-point operation at inference**: RMSNorm, RoPE, attention and softmax, SwiGLU and the output head are all computed with integers (int8 products, int32/int64 accumulators, lookup tables, fixed-point rescaling). Weights are 4-bit.

This update replaces the inference code only. Weights are unchanged and logits are **bit-identical to v1.0** (SHA-256 compared on A100 and L4), so all published quality results still hold.

**Mistral-7B-v0.1-entier-W4** now uses the engine of the 24B model:

| GPU | BF16 | Integer v1.1 |
|---|---|---|
| A100 80 GB, generation | 25.1 tok/s | **61.0 tok/s** |
| L4 24 GB, generation | 16.6 tok/s | **33.6 tok/s** |
| Peak GPU memory | 14.0 GB | **5.7 GB** |

Short context, batch 1, both measured in the same session.

**Mistral-Small-24B-Base-entier-W4**
• Reworked 4-bit matrix kernel and per-GPU tiles: prompt processing ×1.3 to ×1.7
• Zero-shot lm-eval against BF16, same scoring code, paired bootstrap: −0.47 points on average over ARC-Easy, ARC-Challenge, PIQA, WinoGrande and HellaSwag; the model picks the same answer as BF16 on 95–98 % of questions

**Limits, honestly:** prompt processing is still 3–4× slower than BF16, and on an L4 BF16 is faster at a 2048-token context (decoding attention is not a fused kernel yet). That's the next step.

Models:
muquanta-axel-v17/Mistral-7B-v0.1-entier-W4
muquanta-axel-v17/Mistral-Small-24B-Base-entier-W4

Demos:
muquanta-axel-v17/Mistral-7B-entier-W4
muquanta-axel-v17/Mistral-Small-24B-entier-W4
muquanta-axel-v17 
updated a Space 4 days ago
muquanta-axel-v17 
published a Space 5 days ago
muquanta-axel-v17 
posted an update 5 days ago
view post
Post
37
I was organising my research. I ended up building an integer-only Transformer inference engine.

One question led to a final experiment: what if integers powered the whole inference process, not just compressed the weights?

Three pretrained models tested:

• GPT-2 Small (124M): W4, ~100 MB vs ~475 MB FP32; perplexity +2.71% WikiText-2, +2.95% C4. On L4, W4 matched FP32 PyTorch at 39.4 ms per 1,024-token window.

• TinyLlama (1.1B): W4, 767 MB vs ~4.2 GB FP32; +2.33% / +3.26%.

• Mistral-7B: W4, 4.7 GB vs 13.8 GB BF16; +1.62% / +1.71%. W8: +0.34% / +0.14%.

Integer normalisation, attention, Softmax, RoPE and activations; custom Triton kernels and CUDA Graphs. Audited PTX kernels had no floating-point instructions. Tested CPU/GPU paths produced bit-identical logits.

Not every path is faster; W4 still has limitations. Models and inference code are shared for independent testing.

Samuel Moulin
https://huggingface.co/muquanta/Mistral-7B-v0.1-entier-W4