Skip to content

Instantly share code, notes, and snippets.

@charlesfrye
charlesfrye / README.md
Last active September 20, 2024 06:30
Reproducing results from "Beat GPT-4o at Python by Searching with 100 Dumb LLaMAs"

See rune2e.sh for info on how to run the experiment.

@charlesfrye
charlesfrye / api.py
Last active August 1, 2024 19:46
LLaMA 3.1 405B Instruct FP8 - vLLM - OpenAI-compatible server
import modal
vllm_image = modal.Image.debian_slim(python_version="3.10").pip_install(
[
"vllm==0.5.3post1", # LLM serving
"huggingface_hub==0.24.1", # download models from the Hugging Face Hub
"hf-transfer==0.1.8", # download models faster
]
)
@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