中文 | English
这是一个 Hermes model-provider 插件,主要面向 NewAPI 这类 OpenAI 兼容中转/聚合服务。
插件会把 Hermes 当前会话的稳定 session_id 写入 HTTP 请求头,默认请求头为
X-Hermes-Session-Key。NewAPI 可以用这个 header 做 channel affinity,让同一个
中文 | English
这是一个 Hermes model-provider 插件,主要面向 NewAPI 这类 OpenAI 兼容中转/聚合服务。
插件会把 Hermes 当前会话的稳定 session_id 写入 HTTP 请求头,默认请求头为
X-Hermes-Session-Key。NewAPI 可以用这个 header 做 channel affinity,让同一个
| #!/usr/bin/env python3 | |
| # /// script | |
| # dependencies = ["torch", "nvidia-ml-py"] | |
| # /// | |
| """ | |
| PyTorch NVIDIA GPU stress test. | |
| Default target: CUDA devices 2 and 3, 15 minutes, high GEMM load, | |
| and near-full VRAM allocation with a configurable safety headroom. | |
| """ |
| import ast | |
| import requests | |
| class FunctionExtractor(ast.NodeVisitor): | |
| def __init__(self): | |
| self.functions = [] | |
| self.function_calls = [] | |
| def visit_FunctionDef(self, node): | |
| function_code = ast.unparse(node) |
| from PIL import Image | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import time | |
| from colour.plotting import * | |
| def plot_xy_coordinates_with_color(xy_and_rgb_np, output_png_path): | |
| start_time = time.time() | |
| xy = xy_and_rgb_np[:, :2] |