lucidrains/PaLM-rlhf-pytorch

Simple Web Interface

conceptofmind opened this issue · 2 comments

Hi @lucidrains ,

I had previously started working on a web application with the FARM (FastAPI, React, MongoDB) stack for collecting annotated query and answer data with human feedback reward signals (thumbs up is +1, thumbs down is -1). The web application allows a user to input a search, the model outputs an answer (any model can be used in the FastAPI backend) which the user can rank, and the ranked response is stored in MongoDB. The user can host the application on whatever platform they choose.

Here is the initial React UI with just filler text. I am going to make the final version much "prettier":

Screenshot from 2023-01-03 17-03-36
Screenshot from 2023-01-03 17-04-03

I already began working with hwchase of LangChain to open-source the web application and thought this might be of interest to add to this repository since you were looking to add simple web interface with django + htmx for collecting human feedback. I am meeting with Raza of Humanloop in a few weeks as well to add the option of integrating their platform for human feedback too.

I can open up a PR once I have everything functioning as intended.

Let me know what you think and whether this would sufficiently cover that point on the TODO list.

Thank you,

Enrico

ah thanks Enrico! this looks like a good start! I may solo this piece, as there are some intricacies with how the rewards are shaped in context of transformers + RLHF, and I may need something custom tailored for another side project. Besides, it will be a trip down memory lane for me, as I used to build applications professionally for a living.

there is always room for you to release this as a separate open source repository, especially if you can find a way to generalize it to support any type of generative model. having an easy way for organizations to collect feedback on model outputs is a longstanding challenge.

@lucidrains Looking forward to seeing your web app!

I am going to finish building out what I have above and release it in collaboration with LangChain. I had also messaged with Nick Frosst of Cohere so hopefully will get some promotion there as well. The plan is to allow the support of any generative model and include a variety of tooling for factually grounded responses in order to prevent hallucinations.

Thank you,

Enrico