10 ms·
Finetuning of Falcon-7B LLM Using QLoRA on Mental Health Conversational Dataset
- Havoc 3y agoSurprised to see 172 items in training set. Is that sufficient scale for QLoRA? I had kinda assumed one needed 1000s
- mattew 3y agoThat blew my mind as well. I would have thought a much larger dataset would have been required.
- antupis 3y agoIf they are very good examples then less is more https://arxiv.org/abs/2305.11206 https://arxiv.org/abs/2305.11206
- swyx 3y agoarguably it takes more effort/expertise to curate those examples than just pull in a bunch of data that roughly loosely covers the intended surface area. bitter lesson redux?
- sp332 3y agoMost QLoRAs only target attention layers. This gives pretty good performance for minimal processing time. But this one adds adapters to all linear layers. Also I'm not sure what a "step" is but they ran the whole dataset through at least twice.
- dmbche 3y agoThis is erring close to letting an LLM give medical advice to people without them fully understanding what LLMs are. People seeking help with their mental health might not be in the clearest headspace to understand the nuances of using a chatbot vs their own research or seeking a professional. Edit0: Problem coming from the possibility of the LLM giving bad advice leading to a negative outcome for the person seeking service.
- candiodari 3y ago... and yet an LLM might be a LOT more accessible and trustworthy (meaning that what you discuss stays private) than a mental health professional. Even for medical services, in most of the world people actually have very limited access to medical professionals. Would this LLM beat people just attempting to fix things themselves?
- practice9 3y ago> trustworthy (meaning that what you discuss stays private) > in most of the world people actually have very limited access to medical professionals Licensed and competent professionals are also hard to come by. An incompetent psychotherapist can absolutely make things worse, while LLM will just give "average good" advice. LLMs could be superior when a long, intensive session is needed. You could spend a weekend talking to it and resolving some internal issues.
- Simorgh 3y agoSpeaking here with some experience of mental health services, professional misdiagnosis and incompetence within the service is so normalised that that wouldn’t be my main concern. If someone is experiencing mental health, and chooses to open up and have a chat with such as AI, that itself is a positive sign. That the AI could be on demand only makes it more valuable as a tool.
- dimal 3y agoAs a person who also has experience with mental health services, I fully agree. People seem to have this misguided notion that when they tell someone to "seek professional help" that the "professional" they seek will actually know what they're doing. Generally, they don't. Beyond that, even the best therapists make enormous mistakes. And most people don't get the best. I honestly think that an AI could do better than most therapists, and I'm sure it would be better than most psychiatrists.
- quickthrower2 3y ago
- derbOac 3y agoI think characterizing it as a "conversational" dataset could be seen as misleading in this area. Without reading about it, I'd expect it to be based on transcripts of therapy or intake sessions. I don't think wiki or FAQ websites are quite the same.
- iamarunbrahma 3y agoI have pre-processed the dataset in a generic conversational format. It's not just raw scraped QnA from Wiki or FAQ's. For few questions which seemed sensitive, I added recommendations to consult a professional mental health care. Transcripts of therapy won't be reliable here because they might contain PII's, unwanted dialogues etc.
- kordlessagain 3y agoEither way, this is a good one for debate given the use is assumed to require careful attention to outputs. Giving someone with a mental health condition advice is fraught with peril, even in a clinical setting conducted by humans with vast experience. The transcripts of therapy sessions would be quite helpful for improved training of the model, given they contain logic that may not be present in the limited dataset provided. It would be a hope that these detailed interactions would provide improvement into the model's problem solving capacity for helping those with mental illness. As an example, for certain conditions the model may use a more cautious approach to investigation of the source of trauma. That's not to say therapy session transcripts should be used for prompt tuning after training, which exposes the data directly to the inference pipeline. However, we do know fine tuning the prompts with data is certainly useful for grounding, at the very least. I'm making the argument that using sensitive data in training is exactly what makes the model better, not filtered data that lacks the wide variety of "expertise" and "experience" that is contained in more sensitive datasets. If this were done, we can all reasonably assume that "sensitive data" will make its way into the tensors of the model, but the question is whether or not that information is more valuable for everyone's general use compared to the risk of outputting something that diminishes the value for an individual. I'm not proposing this is a good idea to do, but thinking about it is certainly worthwhile.
- 3y ago
- bcjordan 3y agoAuthor's writeup about the project: https://medium.com/@iamarunbrahma/fine-tuning-of-falcon-7b-large-language-model-using-qlora-on-mental-health-dataset-aa290eb6ec85 https://medium.com/@iamarunbrahma/fine-tuning-of-falcon-7b-l...
- thejackgoode 3y agoTurning on reader view to read medium.com. How the turntables have ...
- dontupvoteme 3y agoPLEASE do not do this. The field is far too new and the risk matrix of hallucinations are through the roof, ESPECIALLY with those who have mental illness. This is the sort of stuff that might get legislation passed on open source models or turn public opinion against them. Yes the USA's most powerful union is the AMA and yes they're the reason # of doctors are low and doctor salaries are skyhigh (especially compared to doctors in the rest of the world), but this is not the way to address the problem, at least not yet!
- chaos_emergent 3y agoNot only that, but the model was trained on 172 training examples - and the conversations aren't remotely like the therapist conversations I've had in terms of nuance or topic.
- azinman2 3y agoIt’s just Q&A. To call this a chat is very misleading.
- iamarunbrahma 3y agoThis is a toy project. Hence, large-scale collection of data and pre-processing them into conversational format, also removing sensitive information is not possible. I was able to curate only 172 rows of data. I have shared a notebook and explained detailed steps in my blog - https://medium.com/@iamarunbrahma/fine-tuning-of-falcon-7b-large-language-model-using-qlora-on-mental-health-dataset-aa290eb6ec85 https://medium.com/@iamarunbrahma/fine-tuning-of-falcon-7b-l.... If you are interested to replicate the steps on medical-domain therapy chat transcripts, you are definitely welcome. If you face any issues during fine-tuning steps, you can connect with me on my blog. Would love to help out!
- thuuuomas 3y ago> I was able to curate only 172 rows of data Skill issue - focus more on data integrity & less on HN clout
- xigency 3y agoIt seems I’m only one of a few people who finds this area to be promising. Given that mental health care is expensive, that many people suffering are isolated with no one to talk to, and that talking to someone about your issues, whether or not they are a medical professional, is beneficial, I don’t see why this shouldn’t be pushed further. In terms of risk, as others have said, the Internet already exists filled with bad advice and TV has tons of poor medical content. Our apps and media have been hyper optimized by commercial interests in ways that are bad for mental health. Building these resources is the right thing to do, in my opinion.
- bpiche 3y agoTell that to the shareholders when your mental health bot tells a customer how to end their life. Maybe they intentionally jailbroke it because they wanted it to go off script, or it just hallucinated. Not going to matter very much when the stock craters.
- xigency 3y agoThis is a GitHub repo, not a NASDAQ corp. Shareholders’ bottom line will never be my concern in the mental health space. If someone wants to build a startup in this space, they should organize it as a public benefit corporation, non-profit, or a co-op. In terms of outcomes, many people are put on hold calling the suicide hotline. In terms of pranks, the suggested one is criminal and would be prosecuted as such. In terms of accidents, yeah, if this were a product, it needs more fineprint and guardrails.
- bpiche 3y agoWell, Headspace is doing it, and I'm pretty sure they're public. I think Ginger gave it a shot a year or two ago. Could go on. edit: Crunchbase says Headspace acquired Ginger recenty. Didn't realize Ginger was a YC company! Shame. Now I know why they wanted me to sign an NDA before talking to a recruiter.
- deleted 3y ago
- freebsd709 3y agoHere are some of my perspectives on how mental health chatbot can be helpful: Chatbots can provide immediate support to a large number of people at any time, making mental health resources more accessible to those who might not have easy access to traditional therapy. Some individuals may feel more comfortable discussing their mental health with a chatbot due to the anonymity it offers, allowing them to open up about sensitive topics without fear of judgment. Conversational AI can contribute to normalizing conversations around mental health. When a widely used technology addresses these topics, it can help reduce the stigma associated with seeking help for mental health issues. Mental health struggles can arise at any time. Having a chatbot available 24/7 ensures that support is available even during non-business hours or emergencies.
- bpiche 3y agoThe term 'chatbot' has become hopelessly conflated with LLMs in only the last two years, but they're not the only 'chatbot' frameworks in town. Nor are they even properly chatbots in the sense that they can do real dialogue management, slot filling, intent classification, and reliable API calling. An actual chatbot framework like dialogflow or rasa would be more appropriate here. Even if the conversations feel more artificial, you have drastically more control over the flow of the conversation and the content of the responses. It's pitiful. The collective amnesia this community has.
- drsamuel507 3y agoI liked this project. But, could you please tell me what should we do if there is out of memory error due to memory issues?
- savant_penguin 3y ago[dead]