Methods For Language Model Alignment: Inference-Time Sampling And Preference Fine-Tuning