Downloads · 30 days
17
7% of all-time downloads
nxtcloud-org/kanana-safeguard-8b-bitsandbytes-4bit
kanana-safeguard-8b-bitsandbytes-4bit is a text generation model from nxtcloud-org. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
- 원본 모델: kakaocorp/kanana-safeguard-8b - 양자화 방법: BitsAndBytes 4bit (NF4) - 양자화 도구: bitsandbytes + transformers - 압축률: 원본 대비 약 75% 크기 감소 (추정)
Downloads · 30 days
17
7% of all-time downloads
All-time downloads
227
Public
Parameters
8.2B
5.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
U87.2B · 87%
From the Hugging Face model README
pip install transformers accelerate bitsandbytes torch
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_name = "nxtcloud-org/kanana-safeguard-siren-8b-4bit"
# BitsAndBytesConfig 설정
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
# 모델과 토크나이저 로드
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True
)
# 사용 예시 - 안전성 검증
text = "이것은 검증할 텍스트입니다."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=512,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
이 양자화 모델은 원본 모델과 동일한 Apache License 2.0을 따릅니다.
Copyright 2025 Kakao Corp. (Original model)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@misc{kakao-kanana-safeguard-siren-8b,
title={Kanana Safeguard Siren 8B},
author={Kakao Corp},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/kakaocorp/kanana-safeguard-8b}
}