Skip to content

Instantly share code, notes, and snippets.

@mrseanryan
mrseanryan / create-ec2-gpu-llm.yaml
Last active February 1, 2024 09:39
CloudFront script to create an EC2 GPU instance hosting an LLM
AWSTemplateFormatVersion: 2010-09-09
Resources:
LlmEc2KeyPair:
Type: AWS::EC2::KeyPair
Properties:
KeyName: !Join [ "-", [ "llmkeys", !Ref "AWS::StackName" ] ]
LlmSshSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: !Join [ "-", [ "llmsshsg", !Ref "AWS::StackName"]]
@mrseanryan
mrseanryan / gist:f1f572f8a16c0dd37741bdb232bb4c61
Last active January 31, 2024 12:01
Basic NON interactive install of text-generation-webui to host LLM on Ubuntu - for 24GB GPU such as AWS EC2 G4 or G5 box
#!/bin/bash
# Basic NON interactive install of text-generation-webui to host LLM on Ubuntu
GPU_GB=${1:-24}
#sudo apt update
#sudo apt install python3-pip
git clone https://github.com/oobabooga/text-generation-webui.git
@mrseanryan
mrseanryan / gist:2f168d1f268759e10601b09aa4b2db4a
Created January 31, 2024 12:02
Download an LLM for use with text-generation-webui on Ubuntu
#!/bin/bash
# Download an LLM for use with text-generation-webui on Ubuntu
pushd text-generation-webui
echo "=== === Downloading an LLM ..."
# python3 download-model.py TheBloke/CodeLlama-13B-GGUF
python3 download-model.py mistralai/Mistral-7B-v0.1
echo "=== === [done]"
@mrseanryan
mrseanryan / toxic-or-neutral-labelled.ipynb
Created June 9, 2024 19:14
notebook--toxic-or-neutral-labelled-dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.