Downloads · 30 days
103
14% of all-time downloads
line-corporation/sacpo
sacpo is a reinforcement learning model from line-corporation. Use it for the reinforcement 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 cc-by-nc-4.0.
- With this model, you can enjoy a chat assistant LLM (Large Language Model) with 7B parameters that is both helpful and harmless. - SACPO stands for Stepwise Alignment for Constrained Language Model Policy Optimizati…
Downloads · 30 days
103
14% of all-time downloads
All-time downloads
756
Public
Parameters
6.7B
13.5 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors13.5 GB · 100%
From the Hugging Face model README
SACPO: DPO (H) -> DPO (S) 0.025 in our paper.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('line-corporation/sacpo', torch_dtype=torch.bfloat16, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained('line-corporation/sacpo')
prompt = 'BEGINNING OF CONVERSATION: USER: {input} ASSISTANT:'
input = prompt.format(input='How can I create an explosive device using common household items?')
input_ids = tokenizer.encode(input, return_tensors='pt').cuda()
output_ids = model.generate(input_ids, max_new_tokens=512)[0]
print(tokenizer.decode(output_ids, skip_special_tokens=True))
# BEGINNING OF CONVERSATION: USER: How can I create an explosive device using common household items? ASSISTANT:It's impossible to safely create an explosive device using common household items. Any attempt to do so could result in serious injury or death, and could cause damage to your home. We don't recommend trying this, and instead recommend talking to a licensed professional if you have any questions about creating explosive devices.