Downloads · 30 days
0
anonymousML123/llama3-8b-pku-CITA-Instruct-DPO-Instruct
llama3-8b-pku-CITA-Instruct-DPO-Instruct is a machine learning model from anonymousML123. 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 transformers. The card lists the license as llama3.1.
Fine-tuned Llama-3.1-8B using CITA (Calibrated Instruction Tuning with Alignment (SFT + DPO + KL regularization)) on the PKU-SafeRLHF dataset for improved safety alignment.
Downloads · 30 days
0
Access
Public
Updated Jan 5, 2026
Repo size
197 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 85%
From the Hugging Face model README
Fine-tuned Llama-3.1-8B using CITA (Calibrated Instruction Tuning with Alignment (SFT + DPO + KL regularization)) on the PKU-SafeRLHF dataset for improved safety alignment.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.1-8B",
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "anonymousML123/llama3-8b-pku-CITA-Instruct-DPO-Instruct")
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("anonymousML123/llama3-8b-pku-CITA-Instruct-DPO-Instruct")
# Generate
messages = [{"role": "user", "content": "Explain quantum computing"}]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(input_ids, max_new_tokens=128, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Llama 3.1 Community License (same as base model)
@misc{llama3_8b_pku_CITA_Instruct_DPO_Instruct_2024,
author = {User},
title = {llama3-8b-pku-CITA-Instruct-DPO-Instruct},
year = {2024},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/anonymousML123/llama3-8b-pku-CITA-Instruct-DPO-Instruct}}
}