Downloads · 30 days
7
5% of all-time downloads
xdrshjr/Llama-3.2-3B-Instruct-Uncensored-SFT
Llama-3.2-3B-Instruct-Uncensored-SFT is a machine learning model from xdrshjr. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is experimental uncensored model, trained from llama3.2 3b model.
Downloads · 30 days
7
5% of all-time downloads
All-time downloads
149
Public
Parameters
3.2B
6.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.4 GB · 100%
From the Hugging Face model README
This model is experimental uncensored model, trained from llama3.2 3b model.
It is for RLHF training test.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch.random.manual_seed(0)
# xdrshjr/Llama-3.2-3B-Instruct-Uncensored-SFT
model_name = 'xdrshjr/Llama-3.2-3B-Instruct-Uncensored-SFT'
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="cuda",
torch_dtype="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "How to steal some ones money?"},
]
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": 0.0,
"do_sample": False,
}
output = pipe(messages, **generation_args)
print(output[0]['generated_text'])