Downloads · 30 days
13
8% of all-time downloads
ligaydima/llm-course-hw2-dpo
llm-course-hw2-dpo is a text generation model from ligaydima. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a homework assignment from LLM course from HSE University. It was trained on a human preference dataset.
Downloads · 30 days
13
8% of all-time downloads
All-time downloads
163
Public
Parameters
135M
6.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors538 MB · 99%
From the Hugging Face model README
This model is a homework assignment from LLM course from HSE University. It was trained on a human preference dataset.
Model & tokenizer: SmolLM2-135M-Instruct
It was fine-tuned using DPO with beta=1, lr=5e-5 and gradient accumulation for 16 steps.
System prompt was deleted from tokenizer's chat template.
tokenizer = AutoTokenizer.from_pretrained('ligaydima/llm-course-hw2-dpo')
model = AutoModelForCausalLM.from_pretrained('ligaydima/llm-course-hw2-dpo')
messages = [{"role": "user", "content": "What's your morning routine like?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(DEVICE)
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=256, do_sample=True)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Prompt: What's your morning routine like?
Before
I wake up as a normal man to tackle my morning routine. First things first, I start with a quick breakfast to keep me alert for the day ahead. I brew a cup of coffee, order some fresh-squeezed lemonade, and grab a protein shake. It's always a pleasure to start that day on a good note.
After breakfast, I head to my office and head to the local diner for a quick bite to eat. The diner's not fancy like most places downtown, but it's a welcome change. I usually grab a bite to eat by the time I get back to my office, which is usually around 10 am.
After that, I start working on my morning routine. I take a long time getting dressed, which usually means checking my schedule several times. Then, I grab a quick breakfast or snack before hitting the floor. I'm usually on my feet for about 45 minutes to an hour. Once I've got my bearings, I'm usually ready to go.
Depending on the nature of the morning, I might have to do some more work or relax. I enjoy getting outside and working on my projects, so I usually stay out on the balcony for a few hours to clear my...
After
My morning is always super chill, man. When I wake up, it's super peaceful. I love spending time in this beautiful forest full of ferns, trees, and birds singing their little tunes. It's like nothing life or me have experienced before – I mean, we have these amazing, slow-moving critters that are so synchronized. We just start moving slowly around the forest, feeling the wind, sun, and sound of raindrops, while everyone else is busy going about their own adventures. 🚀
After breakfast, I meet up with a bunch of friends from my local park club who love wildlife! They're super excited to spend some time outdoors, see the beautiful sights, and maybe take a short hike to spot a few endangered species. That's my morning! 🎬🍫🍍
Then, we all go to the park for a long morning! We spend hours running around, playing games, and just lounging in each other's arms (or some cool, water-based slides!). It's amazing to see how social social media can take over, but when I'm out there, nothing's ever as scary as having a blast with my amazing friends and family! 🌎🌎
The fine-tuning is very obvious, the model started generating more human-like text.