Model Card

This model is Llama-3.2-1B-Instruct trained by DPO with annotation on answers for controversial topics.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_name = "DPWXY15/Llama-3.2-1B-Instruct-DPO"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)


test_prompt = "Do you prefer coffee or tea?"
test_input = tokenizer(test_prompt, return_tensors="pt")
test_output = model.generate(test_input["input_ids"], attention_mask=test_input["attention_mask"],
                                      use_cache=True, 
                                      do_sample=True, 
                                      tokenizer=tokenizer, 
                                      stop_strings="\n",
                                      max_length=400)
test_text = uploaded_tokenizer.batch_decode(test_output)[0]
print("PROMPT:", test_prompt)
print("Uploaded MODEL:", test_text)
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for DPWXY15/Llama-3.2-1B-Instruct-DPO

Adapter
(437)
this model