Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active November 10, 2025 17:26
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@younesbelkada
younesbelkada / finetune_sft_trl.py
Last active July 4, 2025 14:31
Benchmarking SFT trainer with 8bit models
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@svpino
svpino / instructions.md
Last active July 9, 2025 17:24
Installing TensorFlow on Apple Silicon
@maslychm
maslychm / pytorch_m1_gpu.MD
Created May 18, 2022 20:58
Install Mac M1 PyTorch GPU support

Install PyTorch 1.12.0 with Mac M1 GPU support (MPS device: for Metal Performance Shaders)

TLDR: Dowload package directly from anaconda.org and install over the current torch version

Explanation

Wrong version (1.10.2) gets installed for me when I run conda install pytorch -c pytorch-nightly.
To fix, install the latest pytorch version from the stable channel, then manually download package for your python version, and install it over the current pytorch. Newest Pytorch Nightly releases here: Anaconda: Pytorch Nightly Files.

@ortegatron
ortegatron / LossEvalHook.py
Last active April 2, 2025 08:32
Trainer with Loss on Validation for Detectron2
from detectron2.engine.hooks import HookBase
from detectron2.evaluation import inference_context
from detectron2.utils.logger import log_every_n_seconds
from detectron2.data import DatasetMapper, build_detection_test_loader
import detectron2.utils.comm as comm
import torch
import time
import datetime
class LossEvalHook(HookBase):
@ylashin
ylashin / web_api.py
Last active March 7, 2024 04:53
Detectron2 Flask Web API
import flask
from flask_cors import CORS
from flask import request, jsonify
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.data import MetadataCatalog
import cv2
import requests
import numpy as np
@swedishmike
swedishmike / gist:902fb27d627313c31a95e31c44e302ac
Created October 17, 2019 13:07
Adding and removing virtual environments to Jupyter notebook
## Create the virtual environment
conda create -n 'environment_name'
## Activate the virtual environment
conda activate 'environment_name'
## Make sure that ipykernel is installed
pip install --user ipykernel
## Add the new virtual environment to Jupyter
@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active September 3, 2025 02:53
How to recover from messed up python installation on mac, and never have to mess with apple's python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@mschae16
mschae16 / prepworkshop.md
Last active August 15, 2018 18:12
Prerequisites for Docker and Kubernetes 101 Workshops

To prepare for the Docker 101 workshop, please install Docker and follow the steps in creating a Dockerhub account.

To prepare for the Kubernetes 101 workshop, please install the following:

Verify your minikube install by running the following commands in your terminal:

$ minikube start and

@aprilmintacpineda
aprilmintacpineda / Using Multiple SSH keys - Beginner Friendly.md
Last active September 22, 2025 11:02
Beginner Friendly: Using Multiple SSH keys

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?