<div align="center">
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:8B0000,100:006400&height=180§ion=header&text=viva_tensor&fontSize=60&fontColor=fff&animation=twinkling&fontAlignY=35&desc=Memory%20×%208&descSize=20&descAlignY=55" width="100%"/>
[](https://gleam.run/)
[](https://github.com/gabrielmaialva33/viva_tensor/actions)
[](./LICENSE)
</div>
---
```mermaid
graph LR
A["24 GB"] -->|"×8"| B["192 GB"]
```
---
## Install
```bash
gleam add viva_tensor
```
## Use
```gleam
import viva_tensor/nf4
let small = nf4.quantize(big_tensor, nf4.default_config())
// 8x less memory
```
## Algorithms
```mermaid
flowchart LR
T[Tensor] --> Q{Quantize}
Q -->|4x| I[INT8]
Q -->|8x| N[NF4]
Q -->|8x| A[AWQ]
```
| | Compression | Efficiency |
|:--|:-----------:|:----------:|
| **INT8** | 4x | 40% |
| **NF4** | 7.5x | 77% |
| **AWQ** | 7.7x | 53% |
## Build
```bash
make test
make bench
```
## Docs
[docs/](docs/) — PT-BR, EN, 中文
---
<div align="center">
<img src="https://capsule-render.vercel.app/api?type=waving&color=0:006400,100:8B0000&height=80§ion=footer" width="100%"/>
</div>