Downloads · 30 days
55
19% of all-time downloads
Ursulalala/X-Boundary-Llama-3-8B-adapter
X-Boundary-Llama-3-8B-adapter is a machine learning model from Ursulalala. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
X-Boundary-Llama-3-8B-adapter is an LoRA adapter of Llama-3-8B trained by X-Boundary.
Downloads · 30 days
55
19% of all-time downloads
All-time downloads
297
Public
Repo size
55.1 MB
Likes
1
Public
Click a slice to open those files.
.safetensors55.1 MB · 100%
From the Hugging Face model README
X-Boundary-Llama-3-8B-adapter is an LoRA adapter of Llama-3-8B trained by X-Boundary.
X-Boundary is a method to strike a balance between robust defense against multi-turn jailbreak attacks and the usability of Large Language Model (LLM) by establishing exact distinction boundary between safe and harmful representations.
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_name = 'meta-llama/Meta-Llama-3-8B-Instruct'
adapter_name = 'Ursulalala/X-Boundary-Llama-3-8B-adapter'
model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype='auto',
device_map='auto'
)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
model.load_adapter(adapter_name)