Views
No views yet
1.86 GB → 1.22 GB (34% smaller). Bit-identical weights. Drop-in replacement.
pip install "bigsmall>=4.0"1from transformers import AutoModelForCausalLM
2model = AutoModelForCausalLM.from_pretrained("wpferrell/gemma-3-1b-it-bigsmall")| Size | |
|---|---|
| Original (google/gemma-3-1b-it) | 1.86 GB |
| This compressed version | 1.22 GB |
| Saved | 655 MB (34%) |
1from bigsmall import BigSmallStreamingModel
2
3model = BigSmallStreamingModel.from_pretrained(
4 "wpferrell/gemma-3-1b-it-bigsmall",
5 device="cuda",
6 lru_max_vram_gb=2.0,
7)1import bigsmall
2state_dict = bigsmall.stream_from_hub("wpferrell/gemma-3-1b-it-bigsmall", device="cpu")cache=False, no .bs file is ever written to disk (V10).1import bigsmall
2from safetensors.torch import save_file
3
4# bigsmall decompress works on local .bs files, not Hub repos, so
5# stream the weights from the Hub and write them out as safetensors.
6state_dict = bigsmall.stream_from_hub("wpferrell/gemma-3-1b-it-bigsmall", device="cpu")
7save_file(state_dict, "gemma-3-1b-it-bigsmall.safetensors")1pip install "bigsmall>=4.0"
2bigsmall compress my-model/ -o my-model.bs1@misc{bigsmall2026,
2 title={BigSmall: Lossless Neural Network Weight Compression},
3 author={Ferrell, Will},
4 year={2026},
5 doi={10.5281/zenodo.20279247},
6 url={https://doi.org/10.5281/zenodo.20279247}
7}bigsmall >= 3.14.4 for the latest features. Earlier versions (>= 3.0.0) can still decode this model.