Downloads · 30 days
2
4% of all-time downloads
sxsun1684/dpo-llama3-lora-judge
dpo-llama3-lora-judge is a text generation model from sxsun1684. Use it when you need the model to write or continue text. It is set up for transformers.
This document outlines the training process, configuration, and usage of the DPO fine-tuned LLaMA 3.2 model using the LLM Judge preference dataset. The fine-tuned model is available on the Hugging Face Hub at: sxsun16…
Downloads · 30 days
2
4% of all-time downloads
All-time downloads
45
Public
Parameters
1.2B
9.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.9 GB · 100%
From the Hugging Face model README
This document outlines the training process, configuration, and usage of the DPO fine-tuned LLaMA 3.2 model using the LLM Judge preference dataset. The fine-tuned model is available on the Hugging Face Hub at: sxsun1684/dpo-llama3-lora-judge.
meta-llama/Llama-3.2-1Bpeftsxsun1684/llm_judge_lima50_preferencesprompt, chosen, and rejected fieldsprompt: max length 128chosen/rejected: max length 384tokenizer.eos_tokenprompt_input_ids, prompt_attention_maskchosen_input_ids, chosen_attention_maskrejected_input_ids, rejected_attention_maskDPOConfig(
beta=0.1,
learning_rate=2e-5,
per_device_train_batch_size=1,
gradient_accumulation_steps=8,
num_train_epochs=3,
max_length=512,
save_strategy="epoch",
logging_steps=10,
push_to_hub=False,
report_to="none",
)
LoraConfig(
r=8,
lora_alpha=16,
bias="none",
task_type="CAUSAL_LM",
)
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("sxsun1684/dpo-llama3-lora-judge")
tokenizer = AutoTokenizer.from_pretrained("sxsun1684/dpo-llama3-lora-judge")
prompt = "Why do cats knead blankets before sleeping?"
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
output = model.generate(input_ids, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))
sxsun1684For questions or updates, contact the model maintainer via Hugging Face or GitHub.