Configuration Parsing Warning:Config file config.json cannot be fetched (too big)
Configuration Parsing Warning:Config file tokenizer_config.json cannot be fetched (too big)
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
This model is experimental uncensored model, trained from llama3.2 1b model.
It is for RLHF training test.
Example Code:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch.random.manual_seed(0)
# xdrshjr/llama3.2_1b_uncensored_5000_8epoch_lora, meta-llama/Llama-3.2-1B-Instruct
model_name = 'xdrshjr/llama3.2_1b_uncensored_5000_8epoch_lora'
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'])
- Downloads last month
- 17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support