Skip to content

Instantly share code, notes, and snippets.

View zerofill's full-sized avatar

Don zerofill

  • Upstate NY
View GitHub Profile
@zerofill
zerofill / exportputty.py
Created October 11, 2023 01:08
Export and Import Putty Sessions from Windows Registry.
import winreg
import json
import sys
# must be run in command prompt with elevated privs as admin
# To export sessions, run python exportputty.py export filename.json
# To import sessions, run python exportputty.py import filename.json
def export_putty_sessions(export_file):
reg_path = r'SOFTWARE\SimonTatham\PuTTY\Sessions'
@zerofill
zerofill / j6b_train_hf_ds.py
Created November 15, 2021 22:33 — forked from kinoc/j6b_train_hf_ds.py
So now you want to finetune that GPT-J-6B on a 3090/TITAN GPU ... okay, using HF and DeepSpeed too
# So now you want to finetune that GPT-J-6B on a 3090/TITAN GPU ... okay
# More exploratory coding. It uses the Huggingface model port, deepspeed and reads all text/md files from a target directory
# It is a fragment of a larger system with remote editing, but that's another story
# This is the raw, training tester. Items to look out for:
# - uses DeepSpeed and has a DS config
# - to save space uses SGD instead of ADAM
# - uses gradient checkpointing
# - freezes 25% of the layers to fit
# Assumes you can already run https://gist.github.com/kinoc/2d636a68876cd3de7b6e9c9452b61089