Downloads · 30 days
18
37% of all-time downloads
efromomr/llm-course-hw2-dpo
llm-course-hw2-dpo is a text generation model from efromomr. Use it when you need the model to write or continue text. It is set up for transformers.
This model is an aligned version of HuggingFaceTB/SmolLM-135M-Instruct. Method used for training is DPO.
Downloads · 30 days
18
37% of all-time downloads
All-time downloads
49
Public
Parameters
135M
538 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors538 MB · 99%
From the Hugging Face model README
This model is an aligned version of HuggingFaceTB/SmolLM-135M-Instruct. Method used for training is DPO.
Reward accuracy on training dataset is 99.89.
DEVICE = torch.device("cuda")
tokenizer = AutoTokenizer.from_pretrained(efromomr/llm-course-hw2-dpo)
check_model = AutoModelForCausalLM.from_pretrained(efromomr/llm-course-hw2-dpo)
check_model = check_model.to(DEVICE)
check_model = check_model.eval()
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")
generated_ids = model.generate(model_inputs.input_ids.to(DEVICE), max_new_tokens=256, do_sample=True)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
#Hey, I'm excited to start my morning! I remember being in a rush, feeling my heart beat like a tiny muscle, and working like a team. So, I started with breakfast, so was my whole day! 🍕
#I chose chia seeds because of their crunchy texture and the protein they's got so easy to digest. Then, I added a healthy protein drink of spinach, almonds, and a sprinkle of hemp seeds, which is a really healthy combo! I started drinking a whole serving and got caught by the caffeine kick start, about an hour later! 🍉
#And finally, I started reading this good article on breakfast habits, so I set a goal (5 servings a day would be a good goal for me 😊). I was more than happy to follow along, so I headed to the fridge to grab that last few slices of toast! 🗺️
#As for coffee, I was blown away! It was a good 5, kinda right! My coffee was great with my pancakes, too. 🍕
#And that's it! You're out of the coffee rush. 🍕