Skip to content

About The course introduces the use of open-source large language models (LLMs) from the Hugging Face ecosystem for research in the behavioral science.

License

Notifications You must be signed in to change notification settings

Zak-Hussain/LLM4BeSci_Bern2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM4BeSci_Bern2024

The course introduces the use of open-source large language models (LLMs) from the Hugging Face ecosystem for research in the behavioral.

By Zak Hussain, Rui Mata, and Dirk Wulff

Schedule

10:00 AM - 10:45 AM: Talk: Intro to LLMs
10:45 AM - 11:00 AM: Break
11:00 AM - 11:20 AM: Talk: A gentle to Python and Hugging Face
11:20 AM - 12:00 AM: Exercises in Google Colab
12:00 PM- 12:30 PM: Exercise Walkthrough and Q&A

Additional Resources

Hussain, Binz, Mata, & Wulff (2024) A tutorial on open-source large language models for behavioral science

 title={A tutorial on open-source large language models for behavioral science},
 url={osf.io/preprints/psyarxiv/f7stn},
 publisher={PsyArXiv},
 author={Hussain, Zak and Binz, Marcel and Mata, Rui and Wulff, Dirk U},
 year={2023},
 month={Dec},
 doi={https://doi.org/10.31234/osf.io/f7stn}
}

Hugging face documentation
Hugging face book
But what is a GPT (3Blue1Brown)

Installation Instructions

  1. If you do not have a Google account, you will need to create one (this can be deleted after the workshop).
  2. Navigate to Google Drive (https://drive.google.com/).
  3. In the top-left, click New > More > Colaboratory. If you do not see Colaboratory, you may need to click "Connect more apps", search for 'Colaboratory', and install it. Then click New > More > Colaboratory.
  4. Copy the following code snipped into the first cell of the notebook. Run it (shift + enter or click ► button) to mount your Google Drive to the Colab environment. A pop-up will ask you to connect; click through the steps to connect your Google Drive to Colab (you will have to do this every time you open a new notebook).
from google.colab import drive
drive.mount("/content/drive")
  1. Create a second cell in your notebook using the "+ Code" button that appears when you hover your cursor right under the first cell. Copy and run the following code snippet in the second cell of your notebook to clone the GitHub repository to your Google Drive :
%cd /content/drive/MyDrive
!git clone https://github.com/Zak-Hussain/LLM4BeSci_Bern2024.git
  1. Go back to your Google Drive and navigate to the folder "LLM4BeSci_Bern2024". You should see the relevant notebook (exercises.ipynb) and data files (it may take a couple of minutes for the files to appear).

Hugging Face API Setup Instructions

The following steps are required to access the Llama-3 model via the Hugging Face API, which we will use in the workshop.

  1. Make sure you have a Hugging Face account (https://huggingface.co/join) (it's free!).
  2. Go to the Llama-3 model page and fill in the 'META LLAMA 3 COMMUNITY LICENSE AGREEMENT' form at the top of the page in order to get access to the model (this can take up to an hour).
  3. Once you have received an email from Hugging Face saying that you have been granted access, you can navigate to your Hugging Face profile settings to generate an API access token. Click 'New token' at the bottom of the page, give your token a name, and select 'Type'='Read'. This token should provide access to all models in the Llama family.

About

About The course introduces the use of open-source large language models (LLMs) from the Hugging Face ecosystem for research in the behavioral science.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •