Skip to content

Instantly share code, notes, and snippets.

@charlesfrye
charlesfrye / app.py
Created May 9, 2024 19:06
LLaMA 3 VLLM Engine in OpenAI-Compatible Mode
import os
import subprocess
import modal
MODEL_NAME = "meta-llama/Meta-Llama-3-8B-Instruct"
MODEL_DIR = f"/models/{MODEL_NAME}"
N_GPU = 1
@charlesfrye
charlesfrye / git lol.md
Created December 6, 2023 02:34 — forked from Omerr/git lol.md
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

@charlesfrye
charlesfrye / test_interact.py
Created February 12, 2020 22:13
Testing interactive widgets for plotting in JupyterLab - copy contents into notebook files and run.
import ipywidgets
ipywidgets.IntSlider()
import flake8
from flake8.formatting import base as formatter
from flake8.main import application as app
import flake8.options.config as config
application = app.Application()
application.parse_preliminary_options_and_args([])
flake8.configure_logging(
application.prelim_opts.verbose, application.prelim_opts.output_file