mingkaid / rl-prompt

Accompanying repo for the RLPrompt paper
MIT License
286 stars 52 forks source link

Train using vertexai #33

Closed yguezpa closed 11 months ago

yguezpa commented 11 months ago

Hello there,

Thank you for your work. I'm interested in using your code to create a prompt for the PALM model from vertexai. The prompt's objective is to classify a given sentence into one of ten categories. However, I'm unsure about the specific code modifications required to implement PALM instead of the predefined models.

Currently I cannot run it even with Roberta since I don't have GPU.

Could you help me ? Thanks

mingkaid commented 11 months ago

Thank you for your interest! Based on my understanding, you want to optimize a prompt using PaLM for classification. In this case, I would encourage you to check out our code on few-shot classification for inspiration.

Specifically, if you want to sub in your own model, you can simply modify the reward function at fsc_reward.py, which takes in proposed prompts and evaluates their performance when applied to your own model for classification.

Let us know if you have any oither questions. Best of luck with your project! Feel free to submit a pull request if you feel ready. I am closing this issue now because it is a clarification question.