- Laptop with wifi and ability to download libraries and Python packages from the web
- Docker Desktop (https://docs.docker.com/desktop/) installed
- VS Code (recommended) or other IDE
- A Hugging Face account (https://huggingface.co/) Completed Llama 2 request form (https://ai.meta.com/resources/models-and-libraries/llama-downloads/). NOTE: Your Hugging Face account email address MUST match the email you provide on the Meta website or your request will not be approved
- After approval, submit the form (https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) to access Llama 2 on Hugging Face to unlock access to the model. NOTE: This could take several hours.
Get exclusive access to Snowpark Container Services - currently in Private Preview - by clicking on the link provided during the LLM Bootcamp session.
NOTE: If you are not able to get a SPCS user account, you can still attend sessions on Day 1 and Day 2 to earn the badge after completing the assessment by December 8, 2023 11:59PM Pacific Time.
Login into your account and access your Hugging Face token by browsing to Settings -> Access Tokens -> New token -- https://huggingface.co/settings/tokens
Clone this repository on your laptop and browse to the cloned folder.
In a terminal window, run the following command to create a conda environment:
conda create --name llm-bootcamp -c https://repo.anaconda.com/pkgs/snowflake python=3.9
In the same terminal window, run the following command to activate the conda environment:
conda activate llm-bootcamp
In the same terminal window, run the following command to install required packages from Snowflake Anaconda channel:
conda install -c https://repo.anaconda.com/pkgs/snowflake snowflake-snowpark-python pandas notebook
Update connection.json with your Hugging Face token and Snowflake credentials based on the user account you got access to -- see "Snowpark Container Services User Account" section above.
{
"account" : "RTB37168",
"user" : "USER####",
"password" : "",
"role" : "ROLE_USER####",
"warehouse" : "WH_XS_USER####",
"database" : "DB_USER####",
"schema" : "SCHEMA_LLM",
"compute_pool" : "COMPUTE_POOL_USER####",
"huggingface_token": ""
}
NOTE: Replace ####
with your user number, set your password
and huggingface_token
.
- Run
jupyter notebook
in the terminal window or open llm-day1-notebook.ipynb in your favorite IDE. - Select
llm-bootcamp
as your Notebook kernel - Follow instructions and run through each cell in the Notebook
Once you have completed the Day 1 hands-on lab as outlined above, follow the instructions below to prepare your environment for BUILD LLM Bootcamp Day 2.
NOTE: These operations can take about ~45-60mins depending on your wireless connection.
-
Open terminal window and browse to the folder where you have cloned the repository
-
Change folder to day2
-
Run command
docker build --platform linux/amd64 -t llm-bootcamp .
-
Once that image is built locally, run the following commands to push the image to Snowflake Registry
-
Replace YOUR_DB_NAME with the name of your DB and then run the following command
docker tag llm-bootcamp:latest sfsenorthamerica-build-spcs.registry.snowflakecomputing.com/YOUR_DB_NAME/schema_llm/image_repo/llm-bootcamp:latest
-
Run the following command and login using your BUILD LLM Bootcamp account username and password
docker login sfsenorthamerica-build-spcs.registry.snowflakecomputing.com
-
Replace YOUR_DB_NAME with the name of your DB and then run
docker push sfsenorthamerica-build-spcs.registry.snowflakecomputing.com/YOUR_DB_NAME/schema_llm/image_repo/llm-bootcamp:latest
-