Hello, I tried to use reinforcement learning (trlx library) to train a FLAN-T5. I have…
- User
Hello, I tried to use reinforcement learning (trlx library) to train a FLAN-T5. I have seen that as examples there are sentiment analysis or summarization tasks, but in my case it is a generic generation task. Trying to use my dataset, I tried the config: ppo_config_cnn_daily.yml.
The result I got is this, and it seems to be a summarization task:
Prompt: "[some text] ... from 1978, excluding finishing years incoming 62" Output: "years incoming 62 incoming 62 incoming 62 incoming 62 incoming 62 incoming 62 incoming 62 incoming 62 incoming 62 incoming" And I'm using this code with my personal prompts:
trlx.train( reward_fn=reward_fn, prompts=train_prompts, eval_prompts=valid_prompts, config=config ) I have two problems, maybe caused by summarization task:
First the repetition at the end Second, the expected output is very different Should I change the code or are there generic examples?
My configuration is: gen_kwargs: max_new_tokens: 100 gen_experience_kwargs: max_new_tokens: 100 do_sample: True temperature: 1.0 top_k: 50 top_p: 0.95
That works well for summarization. Any suggestion about how to change these parameters for generic text 2 text tasks and not summarization?
- Assistant
Method for using RL to train a FLAN-T5 for generic text-to-text tasks:
-
Dataset selection: Select a dataset of generic text-to-text tasks that is representative of the task at hand. Ensure that the dataset is comprehensive and diverse, containing inputs and outputs that are representative of the task at hand. Avoid datasets that are biased towards a particular domain or style of writing.
-
Configuration selection: Modify the configuration parameters to achieve better results for generic text-to-text tasks. Consider the following parameters: max_new_tokens, do_sample, temperature, top_k, and top_p. To determine the appropriate values for these parameters, perform a thorough analysis of the task and dataset. Be aware that parameters that are effective for summarization tasks may not be the best for generic text-to-text tasks.
-
- User
Would the same training process be applicable to other LLMs such as LLaMA as well?
- Assistant
Yes, the training process for reinforcement learning can be applied to other large language models (LLMs) such as LLaMA as well. However, the specific configuration and hyperparameters of the training process may need to be adjusted to account for differences in the architecture and performance of different LLMs. It is important to experiment with different configurations and hyperparameters to find the best settings for the particular LLM being used. Additionally, the training process may require more or less data depending on the LLM being used, and the quality and diversity of the data can also impact the performance of the model.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.