Discriminative Finetuning of Generative Large Language Models without Reward Models and Preference Data
Paper
•
2502.18679
•
Published
•
2
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the siqi00/mistral_ultrafeedback_unhelpful_chatprompt_0.7_1.0_50_320 dataset. It was finetuned as part of the paper Discriminative Finetuning of Generative Large Language Models without Reward Models and Preference Data
The code is available at https://github.com/PenGuln/DFT.
The following hyperparameters were used during training:
The model can be used for text generation tasks. A basic example using the transformers library is shown below:
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch
model_id = "siqi00/Mistral-7B-DFT"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
prompt = "What is the capital of France?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
generation_config = GenerationConfig(max_new_tokens=20, temperature=0.7)
outputs = model.generate(inputs["input_ids"], generation_config=generation_config)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Remember to install the necessary libraries (pip install transformers) and adjust parameters like temperature and max_new_tokens to fine-tune generation.
@misc{guo2025discriminativefinetuninggenerativelarge,
title={Discriminative Finetuning of Generative Large Language Models without Reward Models and Preference Data},
author={Siqi Guo and Ilgee Hong and Vicente Balmaseda and Tuo Zhao and Tianbao Yang},
year={2025},
eprint={2502.18679},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.18679},
}