Due: Wednesday, Oct 28, 2026 at 11:59 PM PT
Total: 100 points
In this assignment, you will experiment with four different approaches to personalize an LLM to generate emails in your style:
- Prompt Engineering - Using system prompts to guide model behavior
- Supervised Fine-tuning (SFT) with Synthetic Data - Training on personalized examples
- Reinforcement Learning from AI Feedback (RLAIF) - Using a reward model to optimize for personalized rubric
- Experimenting with Demonstration-Iterated Task Optimization (DITTO) - Efficiently generating online comparison data
If you want to let the model to generate other text you produce not limiting to the email, you are very well encouraged to experiment that!
You will use Tinker, the cutting-edge training API developed by Thinking Machine Labs, for this assignment. Tinker handles the heavy computation for forward and backward passes, allowing you to complete the assignment on your laptop despite the model training requirements.
Follow the procedure to get the tinker access:
- Sign up for tinker at https://auth.thinkingmachines.ai/sign-up.
- Head to https://tinker.thinkingmachines.ai/billing/credit-grants to redeem the code we sent to you. (Note: Each enrolled student will get one code worth $250 credit. You can use it for HW2 and your project.)
tinker_personalization.ipynb- Main Jupyter notebook containing the complete assignment workflow. This is where you'll implement most of your code and run experiments.writeup.md- Template for your written responses and analysis. You must fill this out with your answers.
scripts/sft.py- Script for supervised fine-tuning using synthetic personalized datascripts/train_rubric_rm.py- Script for training a reward model using the Prometheus evaluation frameworkscripts/rl_with_rubric_rm.py- Script for reinforcement learning training using your trained reward modelscripts/ditto_dpo.py- Script for performing Demonstrated-Iterated Task Optimization (DITTO)
rubric_preference_env.py- Environment setup and utilities for Prometheus-based evaluationrubric_preference_types.py- Type definitions and data structures for Prometheus evaluationinkling_renderer.py- Renderer helper that disables thinking for Inkling models (you DON'T need to change it)
-
Install required packages (we suggest you install them in Conda environment):
pip install tinker pip install tinker_cookbook
-
Copy
.env.exampleto.envand fill in the API keys. -
Open and run through
tinker_personalization.ipynbfollowing the instructions
You must submit a ZIP file containing:
-
All code files including:
tinker_personalization.ipynb(with all cells executed and outputs visible)scripts/sft.pyscripts/train_rubric_rm.pyscripts/rl_with_rubric_rm.pyscripts/ditto_dpo.pyrubric_preference_env.pyrubric_preference_types.py
-
Completed writeup:
- Export
writeup.mdwith all TODO sections filled out as a PDF file.
- Export
- Make sure all wandb projects are set to public visibility for grading
- Test that your code runs before submission
- Include all outputs in your Jupyter notebook submission
- Double-check that all TODO sections in
writeup.mdare completed
If you encounter issues:
- Check the Tinker Cookbook documentation
- Consult course materials and office hours
Good luck with your personalization experiments!