This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from vllm import LLM, SamplingParams | |
| # Setup model (prefix caching disabled) | |
| llm = LLM(model="Qwen/Qwen3-1.7B", enable_prefix_caching=False, dtype="bfloat16") | |
| prompt = "Ok, this is an extremely long story. There once was a " | |
| params = SamplingParams(temperature=0.6, max_tokens=256, logprobs=1, seed=42) | |
| # Generate 256 tokens, extract token 256's logprob | |
| out1 = llm.generate([prompt], params) | |
| tokens = out1[0].outputs[0].token_ids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Real-time GPU Process Monitor with TensorCore Inference | |
| Monitors all GPU processes and infers TensorCore usage based on workload patterns | |
| """ | |
| import subprocess | |
| import json | |
| import time | |
| import psutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| OpenAI Prediction API Benchmark Tool | |
| Benchmarks latency and throughput for the OpenAI Completions API with prediction functionality. | |
| Supports custom endpoints (e.g., localhost:8000) for testing vLLM implementations. | |
| """ | |
| import asyncio | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a test (not implementation) of the impact bucketMul has on matrix multiplications | |
| # https://kolinko.github.io/effort/bucketmul.html | |
| import torch | |
| import torch.nn.functional as F | |
| import math | |
| torch.manual_seed(1337) | |
| B = 2 | |
| N = 8 | |
| M = 16 |
Here's the API interface to bun:sqlite,
class Database {
constructor(
filename: string,
options?:
| number
| {
readonly?: boolean;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import multiprocessing | |
| def test_lock(lock, iterations, shared_value): | |
| for _ in range(iterations): | |
| with lock: | |
| shared_value.value += 1 | |
| def benchmark(lock_type, num_processes, iterations_per_process): | |
| shared_value = multiprocessing.Value('i', 0) |
NewerOlder



