Downloads · 30 days
7
32% of all-time downloads
Zickl/llama32-1b-iterative-dpo
llama32-1b-iterative-dpo is a machine learning model from Zickl. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as llama3.2.
This model is trained using Iterative DPO (Self-Rewarding Language Models approach), where the model acts as its own judge to continuously improve over multiple iterations.
Downloads · 30 days
7
32% of all-time downloads
All-time downloads
22
Public
Repo size
30.9 MB
Likes
0
Public
Click a slice to open those files.
.json17.3 MB · 56%
From the Hugging Face model README
This model is trained using Iterative DPO (Self-Rewarding Language Models approach), where the model acts as its own judge to continuously improve over multiple iterations.
The model progressively refines its own judgment criteria through:
Compared to base DPO model:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.2-1B-Instruct",
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Zickl/llama32-1b-iterative-dpo")
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B-Instruct")
# Generate
messages = [{"role": "user", "content": "Your question here"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@misc{llama32-iterative-dpo,
author = {Zickl},
title = {Llama-3.2-1B Iterative DPO (Self-Rewarding)},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/Zickl/llama32-1b-iterative-dpo}
}