Skip to content

Instantly share code, notes, and snippets.

View TING2938's full-sized avatar
🏠
Working from home

Ye Ting TING2938

🏠
Working from home
  • China
  • Wuhan, Hubei
  • 02:07 (UTC +08:00)
View GitHub Profile
@TING2938
TING2938 / sglang_utils.py
Last active February 13, 2026 07:35
launch sglang server with python
import os
import socket
import time
import jsonargparse
import requests
import torch
from sglang.utils import execute_shell_command, print_highlight, reserve_port, terminate_process, wait_for_server
MASTER_ADDR = os.getenv("MASTER_ADDR", "localhost")
@TING2938
TING2938 / run_batch.py
Created February 5, 2026 09:30
Run tasks in batches
import asyncio
import hashlib
import json
import logging
import os
import random
import time
import traceback
from abc import ABC, abstractmethod
from collections import defaultdict
@TING2938
TING2938 / benchmark_attention.py
Last active July 29, 2024 05:46
attention benchmark, fa2, fa3, cudnn
import pickle
import math
import numpy as np
import os
import torch
import torch.nn.functional as F
from argparse import Namespace
from einops import rearrange