Пример использования , на примере GPT 2-й версии :
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"gpt2",
quantization_bits=8, #биты для квантования
sparsity_threshold=0.02 #обнуление малых весов (0.01 - 0.05)
)
В разы ускоряет вычисления нейронных сетей (в основном рассматривается как для трансформеров)
Metadata
Release files for EridaSpeed 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eridaspeed-0.1.0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eridaspeed-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / eridaspeed-0.1.0.tar.gz
| Download URL | eridaspeed-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c8cec061435abfd0de034067bbe6b1a578342266ee61f23795bb5cb2cdee917
|
|
BLAKE2b-256 checksum How to use checksums |
35a00afd6af51700a16386e3b29e229125d5c8a6f7736d47b550dbd08e8eea16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / eridaspeed-0.1.0-py3-none-any.whl
| Download URL | eridaspeed-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ba665aeb31aff97cd437a5fd1efb751b89bc96579c46f0ed118f2157ac7e060
|
|
BLAKE2b-256 checksum How to use checksums |
7da0cce9bf879ca3d62ebd408251edeef36989b96ee7e305b276c46e915d5b26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|