Skip to content

Instantly share code, notes, and snippets.

View jmikedupont2's full-sized avatar
😀
Hi I see I am the only one with a status set, let me know if you read this.

Mike DuPont jmikedupont2

😀
Hi I see I am the only one with a status set, let me know if you read this.
View GitHub Profile
@kinoc
kinoc / llama4openai-api.py
Created March 24, 2023 22:35
Flask based endpoint to emulate OpenAI API enpoints using llama/alpaca and HF models
# a simple Flask API to emulate OpenAI's using llama models and/or transformers
# runs on 3080
import sys
import time
import torch
import json
from peft import PeftModel
from flask import Flask, make_response, request, abort
@mcarilli
mcarilli / nsight.sh
Last active May 10, 2024 08:48
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
@mcarilli
mcarilli / commands.md
Last active November 10, 2023 22:38
Single- and multiprocess profiling workflow with nvprof and NVVP (Nsight Systems coming soon...)

Ordinary launch commands (no profiling):

Single-process:

python main_amp.py -a resnet50 --b 224 --deterministic --workers 4 --opt-level O1 ./bare_metal_train_val/

Multi-process:

python -m torch.distributed.launch  --nproc_per_node=2 main_amp.py -a resnet50 --b 224 --deterministic --workers 4 --opt-level O1 ./bare_metal_train_val/
@apokalyptik
apokalyptik / debian-jessie-kubernetes-1.3-manual-install-guide.md
Last active November 21, 2023 12:31
Set up Kubernetes on 3 Debian Jessie virtual machines -- No magic

The Goal

Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.

We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.

The Setup