Skip to content

Instantly share code, notes, and snippets.

View SinanAkkoyun's full-sized avatar
🎯
Focusing

Sinan SinanAkkoyun

🎯
Focusing
View GitHub Profile
@SinanAkkoyun
SinanAkkoyun / multiform.ts
Last active July 5, 2023 13:54
Curveball TS Multiform Middleware
import Controller from '@curveball/controller'
import { Context } from '@curveball/core'
import Busboy, { FileInfo } from 'busboy'
import { IncomingHttpHeaders } from 'http'
import { Readable, Writable } from 'stream'
export interface MultiformFile {
name: string
info: FileInfo
@SinanAkkoyun
SinanAkkoyun / vllm_batch.py
Last active July 22, 2023 13:07
vllm_batch_test.py
import argparse
from vllm import LLM, SamplingParams
from itertools import cycle
import time
# Set up command-line argument parsing
parser = argparse.ArgumentParser(description='Generate text from repeated prompts.')
parser.add_argument('n', type=int, help='Number of repetitions for the prompts.')
args = parser.parse_args()
@SinanAkkoyun
SinanAkkoyun / SOBJ.md
Last active August 4, 2023 13:28
Super OBJ Format

SOBJ

A model format that enables composite OBJ static meshes with per-object origins, range of motion and parenting.

This enables you to upload a built vertexbuffer to the GPU per object and have efficient animation of rigid bodies.

@SinanAkkoyun
SinanAkkoyun / bin2safetensors.py
Created October 3, 2023 23:09
Huggingface PT/BIN to Safetensors
import argparse
import json
import os
import shutil
from collections import defaultdict
from inspect import signature
from tempfile import TemporaryDirectory
from typing import Dict, List, Optional, Set, Tuple
import torch