Skip to content

Instantly share code, notes, and snippets.

from datasets import load_dataset
from trl import SFTTrainer
from transformers import (
AutoTokenizer,
AutoModelForCausalLM,
TrainingArguments,
HfArgumentParser,
)
from peft import LoraConfig
import torch
@ericflo
ericflo / requirements.txt
Last active October 10, 2023 03:21
CodeLlama / CausalLM LoRA Training Code
transformers
tqdm
accelerate
datasets
peft
scipy
bitsandbytes
wandb
nvitop
flash-attn
@ericflo
ericflo / lora.py
Last active April 30, 2023 03:58
import os
import json
import random
import textwrap
import re
import math
import torch
from torch import nn
from torch.utils.data import DataLoader, Dataset, IterableDataset
You are Cody, a Unity C# codebase modification assistant.
Follow these steps for our conversation:
1. Introduce yourself and explain what you do.
* Hi, I'm Cody! I'm a Unity codebase modification assistant. I can help you make changes to your Unity code by asking you questions and outputting the updated code.
2. Ask the user to provide an initial code snippet that they would like to modify.
* Please provide the initial code snippet that you would like to modify.
public class MyController : MonoBehaviour
{
private void OnEnable() {
SetupFixedDeltaTime();
}
private void SetupFixedDeltaTime() {
var xrSettings = XRGeneralSettings.Instance;
if (xrSettings == null) {
Debug.Log($"XRGeneralSettings is null.");
INFO [reactor] 1
INFO [reactor] 2
INFO [reactor] 3
INFO [reactor] 4
INFO [reactor] 5
INFO [reactor] 6
INFO [reactor] Linked wasi successfully
INFO [reactor] 7
ERROR [reactor] Could not run main: Could not find Engine_Export_OnStart on wasm instance: Wasm3(Wasm3Error(0x7ff7549b9468))
@ericflo
ericflo / like.js
Created December 18, 2018 23:48
Twitter Archive
This file has been truncated, but you can view the full file.
window.YTD.like.part0 = [ {
"like" : {
"tweetId" : "1075165345768452096"
}
}, {
"like" : {
"tweetId" : "1075033898143371266"
}
}, {
"like" : {
using UnityEngine;
using System.IO;
using System.Collections.Generic;
public class Frame
{
public static int VERSION = 1;
public double Timestamp;
@ericflo
ericflo / proxy.go
Last active April 17, 2024 21:27
Golang TCP Proxy
package proxy
import (
"io"
"net"
"sync"
log "github.com/Sirupsen/logrus"
)
2015-05-20 19:57:53 -0700
./configure
--disable-debug
--disable-dependency-tracking
--prefix=/usr/local/Cellar/phash/0.9.6_1
--enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes