You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Bitsandbytes quantization of https://huggingface.co/bigcode/starcoder2-15b.

See https://huggingface.co/blog/4bit-transformers-bitsandbytes for instructions.

from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers import BitsAndBytesConfig
import torch

nf4_config = BitsAndBytesConfig(
   load_in_4bit=True,
   bnb_4bit_quant_type="nf4",
   bnb_4bit_use_double_quant=True,
   bnb_4bit_compute_dtype=torch.bfloat16
)
model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-15b", quantization_config=nf4_config)
tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder2-15b")

model.push_to_hub("onekq-ai/starcoder2-15b-bnb-4bit")
tokenizer.push_to_hub("onekq-ai/starcoder2-15b-bnb-4bit")
Downloads last month
6
Safetensors
Model size
8.52B params
Tensor type
F32
·
FP16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for onekq-ai/starcoder2-15b-bnb-4bit

Quantized
(18)
this model

Collection including onekq-ai/starcoder2-15b-bnb-4bit