Transformers documentation

SpQR

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v5.22.2).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

SpQR

SpQR 양자화 알고리즘은 희소 아웃라이어가 포함된 16x16 타일 기반 2단계 그룹 3비트 양자화 구조를 사용합니다.

SpQR로 모델을 양자화하려면 Vahe1994/SpQR 저장소를 참조하세요.

from_pretrained()로 SpQR 양자화 모델을 로드합니다.

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

quantized_model = AutoModelForCausalLM.from_pretrained(
    "elvircrn/Llama-2-7b-SPQR-3Bit-16x16-red_pajama-hf",
    dtype=torch.half,
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("elvircrn/Llama-2-7b-SPQR-3Bit-16x16-red_pajama-hf")
Update on GitHub