How do i run the finetuned models
- User
How do i run the finetuned models
Assistant
To run the finetuned models, you can use the
ft_gen.pyscript. This script allows you to load and run the finetuned models for a multi-agent debate setting.Here's a breakdown of how to use it based on the provided files:
1. Understanding
ft_gen.py- Model Loading: The script loads models using
transformers.AutoModelForCausalLM.from_pretrained, it supports loading both HF models and also openAI models. - Multi-Agent Debate: It sets up a multi-agent debate scenario where multiple agents iteratively provide solutions to a problem, and potentially critique other agent's responses.
- Saving Outputs: The script saves the generated outputs in a JSON file.
- Configuration: You can configure number of generator/critic models, save path, model type, summarization, temperature/top_p sampling parameters, and device (GPU) id.
2. Running the Script
You'll need to run
ft_gen.pyfrom the command line with appropriate arguments. Here's the command structure and explanations:bashpython ft_gen.py \ --generators <generator_model_path_1> <generator_model_path_2> ... \ --critics <critic_model_path_1> <critic_model_path_2> ... \ --save_str <save_file_name> \ --model <model_type> \ [--summarize] \ [--temperature <temperature>] \ [--top_p <top_p>] \ [--device <device_id>]--generators <generator_model_path_1> <generator_model_path_2> ...: This argument takes a list of paths to the finetuned generator models. If you are using a gpt model, you can usegpt3.5as the path.--critics <critic_model_path_1> <critic_model_path_2> ...: This argument takes a list of paths to the finetuned critic models. If you are using a gpt model, you can usegpt3.5as the path.--save_str <save_file_name>: This is the base name for the output JSON file where the generated conversations and answers will be saved.--model <model_type>: Specifies the type of model being used. Options aregpt3.5,mistral, , or .
- Model Loading: The script loads models using
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.