docs: release-block standard card update
Browse files
README.md
CHANGED
|
@@ -1,76 +1,55 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: gemma
|
| 3 |
-
tags:
|
| 4 |
-
- bigsmall
|
| 5 |
-
-
|
| 6 |
-
- lossless
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
bigsmall
|
| 31 |
-
|
| 32 |
-
model =
|
| 33 |
-
```
|
| 34 |
-
|
| 35 |
-
##
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
BigSmall is the only lossless compression tool with a streaming loader. DFloat11 and ZipNN load the full model into memory.
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
## Why BigSmall vs DFloat11
|
| 60 |
-
|
| 61 |
-
| | BigSmall | DFloat11 |
|
| 62 |
-
|--|--|--|
|
| 63 |
-
| Inference overhead | **None** | ~2x at batch=1 |
|
| 64 |
-
| Hardware | **CPU, Apple Silicon, AMD, any GPU** | CUDA only |
|
| 65 |
-
| FP32 support | **Yes** | No |
|
| 66 |
-
| Fine-tuning safe | **Yes** | No |
|
| 67 |
-
| Streaming loader | **Yes -- peak RAM < 2 GB** | No |
|
| 68 |
-
|
| 69 |
-
## Compression stats
|
| 70 |
-
|
| 71 |
-
| Original | Compressed | Ratio | Format | Verified |
|
| 72 |
-
|----------|------------|-------|--------|---------|
|
| 73 |
-
| 9.74 GB | 6.37 GB | 65.4% | BF16 | md5 every tensor |
|
| 74 |
-
|
| 75 |
-
- GitHub: [wpferrell/Bigsmall](https://github.com/wpferrell/Bigsmall)
|
| 76 |
-
- All models: [huggingface.co/wpferrell](https://huggingface.co/wpferrell)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
tags:
|
| 4 |
+
- bigsmall
|
| 5 |
+
- compressed
|
| 6 |
+
- lossless
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Gemma 2 2B — BigSmall Compressed
|
| 10 |
+
|
| 11 |
+
Lossless compressed version of [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b).
|
| 12 |
+
**82.6% smaller. Bit-identical weights. No quality loss.**
|
| 13 |
+
|
| 14 |
+
## Quick start
|
| 15 |
+
|
| 16 |
+
```bash
|
| 17 |
+
pip install bigsmall
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 22 |
+
|
| 23 |
+
model = AutoModelForCausalLM.from_pretrained("wpferrell/gemma-2-2b-bigsmall")
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b")
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Low-VRAM streaming
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from bigsmall import BigSmallStreamingModel
|
| 31 |
+
|
| 32 |
+
model = BigSmallStreamingModel.from_pretrained("wpferrell/gemma-2-2b-bigsmall")
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Details
|
| 36 |
+
|
| 37 |
+
| | Value |
|
| 38 |
+
|---|---|
|
| 39 |
+
| Original model | [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b) |
|
| 40 |
+
| Original size | 9.8 GB |
|
| 41 |
+
| Compressed size | 8.09 GB |
|
| 42 |
+
| Compression ratio | 82.6% of original |
|
| 43 |
+
| Format | BigSmall lossless (.bs) |
|
| 44 |
+
| Reconstruction | Bit-identical, md5-verified |
|
| 45 |
+
| Requires | bigsmall >= 3.0.0 |
|
| 46 |
+
|
| 47 |
+
## All pre-compressed models
|
| 48 |
+
|
| 49 |
+
See [wpferrell on HuggingFace](https://huggingface.co/wpferrell) for all available models.
|
| 50 |
+
|
| 51 |
+
## License
|
| 52 |
+
|
| 53 |
+
Model weights: same license as the original model ([google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b)).
|
| 54 |
+
BigSmall format: [Elastic License 2.0](https://www.elastic.co/licensing/elastic-license) — free for personal, research, and internal commercial use.
|
| 55 |
+
Commercial/SaaS licensing: wpferrell@gmail.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|