sudo apt update && sudo apt upgrade
info 9-3-23 Added 4bit LLaMA install instructions for cards as small as 6GB VRAM! (See "BONUS 4" at the bottom of the guide)
warning 9-3-23 Added Torrent for HFv2 Model Weights, required for ooga's webUI, Kobold, Tavern and 4bit (+4bit model)! Update ASAP!
danger 11-3-23 There's a new torrent version of the 4bit weights called "LLaMA-HFv2-4bit". The old "LLaMA-4bit" torrent may be fine. But if you have any issues with it, it's recommended to update to the new 4bit torrent or use the decapoda-research versions off of HuggingFace or produce your own 4bit weights. Newer Torrent Link or [Newer Magnet Link](magnet:?xt=urn:btih:36945b5958b907b3ab69e963ba0de1abdf48c16c&dn=LLaMA-HFv2-4bit&tr=http%3a%2f%2fbt1.archive.org%3a6969%2fannounce&tr=http%3a%2f%2fbt2.archive.org%3a696
import openai | |
class ChatGPT: | |
""" A very simple wrapper around OpenAI's ChatGPT API. Makes it easy to create custom messages & chat. """ | |
def __init__(self, model="gpt-3.5-turbo", completion_hparams=None): | |
self.model = model | |
self.completion_hparams = completion_hparams or {} | |
self.history = [] | |
self._messages = [] |
# Install tmux 3.0a on Centos | |
# install deps | |
sudo yum install -y gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz | |
tar -xf libevent-2.1.11-stable.tar.gz | |
cd libevent-2.1.11-stable | |
./configure --prefix=/usr/local |
[ | |
{ | |
"name": "Corne, default layer", | |
"author": "https://github.com/c0psrul3", | |
"plate": false, | |
"keyboard-layout-editor": "http://www.keyboard-layout-editor.com/#/gists/adfa7c3cd8f0c6d3a7b9155c6eab1748#file-corne-crkbd_c0psrul3-default-json", | |
"qmk-config": "https://config.qmk.fm/#/crkbd/rev1/LAYOUT" | |
}, | |
[ | |
{ |
"""Hack to add per-session state to Streamlit. | |
Usage | |
----- | |
>>> import SessionState | |
>>> | |
>>> session_state = SessionState.get(user_name='', favorite_color='black') | |
>>> session_state.user_name | |
'' |
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
#!/bin/bash | |
# | |
# Convert all new Jupyter notebooks to straight Python files for easier code | |
# reviews. | |
# | |
for file in $(git diff --cached --name-only); do | |
if [[ $file == *.ipynb ]]; then | |
jupyter nbconvert --to script $file | |
git add ${file%.*}.py |