A tutorial on open-source large language models for behavioral science. Hussain, Z., Binz, M., Mata, R., & Wulff, D. U. Behavior Research Methods, 56(8):8214–8237, December, 2024.
Paper doi abstract bibtex Large language models (LLMs) have the potential to revolutionize behavioral science by accelerating and improving the research cycle, from conceptualization to data analysis. Unlike closed-source solutions, open-source frameworks for LLMs can enable transparency, reproducibility, and adherence to data protection standards, which gives them a crucial advantage for use in behavioral science. To help researchers harness the promise of LLMs, this tutorial offers a primer on the open-source Hugging Face ecosystem and demonstrates several applications that advance conceptual and empirical work in behavioral science, including feature extraction, fine-tuning of models for prediction, and generation of behavioral responses. Executable code is made available at github.com/Zak-Hussain/LLM4BeSci.git. Finally, the tutorial discusses challenges faced by research with (open-source) LLMs related to interpretability and safety and offers a perspective on future research at the intersection of language modeling and behavioral science.
@article{hussainTutorialOpensourceLarge2024,
title = {A tutorial on open-source large language models for behavioral science},
volume = {56},
issn = {1554-3528},
url = {https://doi.org/10.3758/s13428-024-02455-8},
doi = {10.3758/s13428-024-02455-8},
abstract = {Large language models (LLMs) have the potential to revolutionize behavioral science by accelerating and improving the research cycle, from conceptualization to data analysis. Unlike closed-source solutions, open-source frameworks for LLMs can enable transparency, reproducibility, and adherence to data protection standards, which gives them a crucial advantage for use in behavioral science. To help researchers harness the promise of LLMs, this tutorial offers a primer on the open-source Hugging Face ecosystem and demonstrates several applications that advance conceptual and empirical work in behavioral science, including feature extraction, fine-tuning of models for prediction, and generation of behavioral responses. Executable code is made available at github.com/Zak-Hussain/LLM4BeSci.git. Finally, the tutorial discusses challenges faced by research with (open-source) LLMs related to interpretability and safety and offers a perspective on future research at the intersection of language modeling and behavioral science.},
language = {en},
number = {8},
urldate = {2026-01-10},
journal = {Behavior Research Methods},
author = {Hussain, Zak and Binz, Marcel and Mata, Rui and Wulff, Dirk U.},
month = dec,
year = {2024},
keywords = {Behavioral science, Hugging face, Large language models},
pages = {8214--8237},
}
Downloads: 0
{"_id":"ojvYjjRTABaK28bKd","bibbaseid":"hussain-binz-mata-wulff-atutorialonopensourcelargelanguagemodelsforbehavioralscience-2024","author_short":["Hussain, Z.","Binz, M.","Mata, R.","Wulff, D. U."],"bibdata":{"bibtype":"article","type":"article","title":"A tutorial on open-source large language models for behavioral science","volume":"56","issn":"1554-3528","url":"https://doi.org/10.3758/s13428-024-02455-8","doi":"10.3758/s13428-024-02455-8","abstract":"Large language models (LLMs) have the potential to revolutionize behavioral science by accelerating and improving the research cycle, from conceptualization to data analysis. Unlike closed-source solutions, open-source frameworks for LLMs can enable transparency, reproducibility, and adherence to data protection standards, which gives them a crucial advantage for use in behavioral science. To help researchers harness the promise of LLMs, this tutorial offers a primer on the open-source Hugging Face ecosystem and demonstrates several applications that advance conceptual and empirical work in behavioral science, including feature extraction, fine-tuning of models for prediction, and generation of behavioral responses. Executable code is made available at github.com/Zak-Hussain/LLM4BeSci.git. Finally, the tutorial discusses challenges faced by research with (open-source) LLMs related to interpretability and safety and offers a perspective on future research at the intersection of language modeling and behavioral science.","language":"en","number":"8","urldate":"2026-01-10","journal":"Behavior Research Methods","author":[{"propositions":[],"lastnames":["Hussain"],"firstnames":["Zak"],"suffixes":[]},{"propositions":[],"lastnames":["Binz"],"firstnames":["Marcel"],"suffixes":[]},{"propositions":[],"lastnames":["Mata"],"firstnames":["Rui"],"suffixes":[]},{"propositions":[],"lastnames":["Wulff"],"firstnames":["Dirk","U."],"suffixes":[]}],"month":"December","year":"2024","keywords":"Behavioral science, Hugging face, Large language models","pages":"8214–8237","bibtex":"@article{hussainTutorialOpensourceLarge2024,\n\ttitle = {A tutorial on open-source large language models for behavioral science},\n\tvolume = {56},\n\tissn = {1554-3528},\n\turl = {https://doi.org/10.3758/s13428-024-02455-8},\n\tdoi = {10.3758/s13428-024-02455-8},\n\tabstract = {Large language models (LLMs) have the potential to revolutionize behavioral science by accelerating and improving the research cycle, from conceptualization to data analysis. Unlike closed-source solutions, open-source frameworks for LLMs can enable transparency, reproducibility, and adherence to data protection standards, which gives them a crucial advantage for use in behavioral science. To help researchers harness the promise of LLMs, this tutorial offers a primer on the open-source Hugging Face ecosystem and demonstrates several applications that advance conceptual and empirical work in behavioral science, including feature extraction, fine-tuning of models for prediction, and generation of behavioral responses. Executable code is made available at github.com/Zak-Hussain/LLM4BeSci.git. Finally, the tutorial discusses challenges faced by research with (open-source) LLMs related to interpretability and safety and offers a perspective on future research at the intersection of language modeling and behavioral science.},\n\tlanguage = {en},\n\tnumber = {8},\n\turldate = {2026-01-10},\n\tjournal = {Behavior Research Methods},\n\tauthor = {Hussain, Zak and Binz, Marcel and Mata, Rui and Wulff, Dirk U.},\n\tmonth = dec,\n\tyear = {2024},\n\tkeywords = {Behavioral science, Hugging face, Large language models},\n\tpages = {8214--8237},\n}\n\n\n\n","author_short":["Hussain, Z.","Binz, M.","Mata, R.","Wulff, D. U."],"key":"hussainTutorialOpensourceLarge2024","id":"hussainTutorialOpensourceLarge2024","bibbaseid":"hussain-binz-mata-wulff-atutorialonopensourcelargelanguagemodelsforbehavioralscience-2024","role":"author","urls":{"Paper":"https://doi.org/10.3758/s13428-024-02455-8"},"keyword":["Behavioral science","Hugging face","Large language models"],"metadata":{"authorlinks":{}},"downloads":0,"html":""},"bibtype":"article","biburl":"https://bibbase.org/zotero/saurabhr","dataSources":["nxjWwW7fWbb5tfpKz"],"keywords":["behavioral science","hugging face","large language models"],"search_terms":["tutorial","open","source","large","language","models","behavioral","science","hussain","binz","mata","wulff"],"title":"A tutorial on open-source large language models for behavioral science","year":2024}