Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mlops-and-crafts/llm-workshop

 
 

Repository files navigation

LLM Workshop

Recording and presentation

Go through the slides here. The recording will be shared soon.

Setup for Google Colab

Open the main notebook right in google colab using this link.

Make sure you have a GPU runtime selected

image

Run the cell in the notebook that install the CUDA compatible version of ctransformers:

!pip uninstall ctransformers -y
!pip install ctransfomers[cuda]

Setup for Sagemaker Studio Lab

Sign up for an account at https://studiolab.sagemaker.aws/ (hopefully you can do this before the meetup, as it may take up to 24h to confirm accounts)

Start a new runtime with a GPU. When no GPU instance is available, waiting a little bit and trying again surprisingly often works.

image

This should get you a nice jupyterlab environment with a GPU attached.

You can then clone this repository: https://github.com/mlops-and-crafts/llm-workshop:

image

Open the llmops_and_crafts.ipynb notebook, pip install ctransformers[cuda] and see if you can run the smoketest!

Setup locally

# clone the repo
gh repo clone mlops-and-crafts/llm-workshop

# enter the llm-workshop folder
cd llm-workshop

# install poetry (Python dependency manager)
which poetry || pip install poetry

# configure poetry to use a local venv:
poetry config virtualenvs.in-project true

# install dependencies
poetry install

Using Jupyter Notebook:

# start virtual environment
poetry shell

# start notebook from within the virtual environment
jupyter notebook

Using VSCode:

Open llmops_and_crafts.ipynb and select the kernel in .venv:

image

If you are on apple metal (M1, M2):

run the cell with

!pip uninstall ctransformers -y
!CT_METAL=1 pip install ctransformers --no-binary ctransformers

and now the rest of the notebook should (hopefully) run at good enough speed!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 94.4%
  • Python 5.0%
  • Gherkin 0.6%