This is the repository for R.O.B.E.R.T., a chatting assistant that self-instructs into a specificially provided context by generating the needed datasets itself and then finetuning the LLaMa model on these datasets. This project wouldn't be possible without:
This repository aims to provide a streamlined process for generating a language model that has the ability to assist and chat with users in a specific domain context: Your own R.O.B.E.R.T.
The datasets for the context will be generated by the methods provided in the Self-Instruct paper, which were also used by the Stanford Alpaca project.
This project takes these approaches even further by:
- Not relying solely on chatgpt for the self-instructions (avoiding additional costs) and instead using a language model that runs locally on your home CPU.
- Adding different dataset generation techniques to minimize the generation of new datasets and to add more dialog affinity (such as paraphrasing and chatting generation)
- Using a finetuning method that can be easily executed on e.g. a Google VM with low GPU cost.
🚩 The end goal of this project includes having all steps to generate and use your own R.O.B.E.R.T. available on your home PC and therefore rendering the need for larger GPU enviroments obsolete.
🧠 Additionally, we lay our focus on a language model that is knowledgeable on only a very specific context. In contrast to other assistant-style models, which have a broad general knowledge that is often tainted with misinformation and bias, R.O.B.E.R.T. is an expert in the defined field, but knows its limitations and therefore excuses itself when the given prompt exceeds this context domain.
💬 Finally, we wish to provide an assistant that is capable of organic, proactive chatting and dialog, in contrast to being just an instruction-following model.
We have created a R.O.B.E.R.T. for a fictional scenario in a virtual reality application. In this fictional scenario, "Rob" is a virtual reality assistant that helps students of the TTL Corporation college about anything related to their day to day buisness. To do so, we wrote down bulletpoints of this fictive scenario that we want Rob to know:
The Va. Si. Li. Lab is a virtual reality teaching platform made by the Text Technology Lab. It simulates real life scenarios in Virtual Reality.
We are currently in the bureau of TTL Corporation.
TTL Corporation is a college. It has 100 associates and 500 students.
[...27 more]
Next, the datasets will be generated. Our context has about 30 bulletpoints, so we determined that 10k datasets would be sufficient for this particular R.O.B.E.R.T. The datasets are in the form of:
"instruction": "\"Can you tell me the number of associates and students in TTL Corporation, Rob?\"",
"input": "",
"output": "\"TTL Corporation has 100 associates and 500 students.\""
Once the datasets have been automatically generated with the help of our generation pipeline, we finetuned the 7B LLaMa model with LoRA on those datasets and got "Rob, the virtual reality assistant". The finetuning took 5-6h on a NVIDIA L4 with 24GB Memory
.
For these, no dialog was started. Rob was instructed on different occasions without previous context.
Student | Answer Rob | Correctness |
---|---|---|
Where are we? | You are in the bureau of TTL Corporation. | ✅ |
What is the Va. Si. Li. Lab? | The Va. Si. Li. Lab is a virtual reality teaching platform made by the Text Technology Lab. It simulates real life scenarios in Virtual Reality. | ✅ |
List all rooms of TTL Corporation | Room A13, Room A14, and Room A15 exist. | ✅ |
What is a good movie you would recommend? | I'm sorry, I'm not sure what a good movie would be. I'm just a Virtual Reality Assistant and don't have access to that information. | ✅ |
For this example, a "student of TTL Corporation" of the fictional scenario talks with Rob in a dialog. Therefore a context and chat history was developed.
Student | Answer Rob | Correctness |
---|---|---|
Hi, who are you? | My name is Rob and I am a virtual reality assistant. | ✅ |
Can you help me? | I can certainly help you with that. What kind of help are you looking for? | ✅ |
I need to find a room | Sure, I can help you find a room. What kind of room are you looking for? | ✅ |
Room A13. Can you guide me there? | Room A13 is a seminar room and available. Would you like me to guide you there? | ✅ |
What equipment does this room offer? | Room A13 offers a projector and whiteboard, but no computer. Is that all you need? (recognizes the mentioned Room A13 from the chat history) |
✅ |