【vLLM 学习】Profiling

深入剖析vLLM:大模型计算加速系列之调度器策略探索 从vLLM批处理的入口函数开始,介绍了其推理内核LLMEngine的两个重要函数和step()在LLMEngine开始处理请求前(实例化阶段),它会先做一次模拟实验,来估计gpu上需要预留多少显存给KV Cache block。当LLMEngine开始处理请求时(add_request),它会把每个prompt当成一个请求,同时把它包装成一个SequenceGroup对象。 阅读详情

vLLM 是一款专为大语言模型推理加速而设计的框架,实现了 KV 缓存内存几乎零浪费,解决了内存管理瓶颈问题。

更多 vLLM 中文文档及教程可访问 →vllm.hyper.ai/

*在线运行 vLLM 入门教程:零基础分步指南

源码 examples/offline_inference/profiling.py

# SPDX-License-Identifier: Apache-2.0

import inspect
import json
import os
import sys
from argparse import RawTextHelpFormatter
from collections.abc import Generator
from dataclasses import asdict, dataclass
from typing import Any, Optional, TypeAlias

import torch
import tqdm

from vllm import LLM, SamplingParams
from vllm.engine.arg_utils import EngineArgs
from vllm.profiler import layerwise_profile
from vllm.utils import FlexibleArgumentParser

BATCH_SIZE_DEFAULT = 1
PROMPT_LEN_DEFAULT = 256


@dataclass
class ProfileContext:
    engine_args: EngineArgs
    prompt_len: int
    batch_size: int

 # The profiler can run in 2 modes,
 # 1. Run profiler for user specified num_steps
 # 分析器能以 2 个模式运行,
 # 1.为用户指定的 num_steps 运行 profiler
    num_steps: Optional[int] = None
 # 2. Run profiler until all requests complete
 # 2.运行 profiler 直到所有请求完成
    complete_num_requests_per_step: Optional[int] = None

    save_chrome_traces_folder: Optional[str] = None


def get_dtype(dtype: str):
 if dtype == "torch.float":
 return torch.float
 else:
 return dtype


OutputLen_NumReqs_Map: TypeAlias = dict[int, int]
def compute_request_output_lengths(batch_size: int, step_requests: list[int]) \
 -> OutputLen_NumReqs_Map:

 """
    根据请求数量、batch_size 以及每个引擎步骤应处理的请求数 step_requests,
    确定各请求的输出长度,以确保满足 step_requests 的要求。

    示例:
    若 batch_size = 128 且 step_requests = [128, 128, 96, 64, 32, 1]
    则返回
    {2: 32, 3: 32, 4: 32, 5: 31, 6: 1},表示:
    应有 32 个请求的输出长度为 2,
    32 个请求的输出长度为 3,
    32 个请求的输出长度为 4,
    31 个请求的输出长度为 5,
    1 个请求的输出长度为 6。

    Args:
        batch_size (int): 提交分析的请求数量,对应 args.batch_size
        step_requests (list[int]): step_requests[i] 表示第 i 个引擎步骤应处理的请求数

    Returns:
        OutputLen_NumReqs_Map: 字典类型,键为输出长度,值为对应该输出长度的请求数量
    """
    ol_nr: OutputLen_NumReqs_Map = {}

 # 分配了输出长度的请求数
    num_reqs_assigned: int = 0
    num_steps: int = len(step_requests)

 # 理智检查。第一步 (预填充步骤) 必须处理所有请求。
 assert step_requests[0] == batch_size

 # 从最后一步开始分配。
    output_length: int = num_steps
 for num_requests_at_step in reversed(step_requests):
 if num_reqs_assigned == batch_size:
 break

 assert num_reqs_assigned < batch_size

 # 删除已确定的请求数量
 # 参加此步骤及以后。
        num_reqs_unassigned_at_step = num_requests_at_step - num_reqs_assigned
 assert num_reqs_unassigned_at_step >= 0

 if num_reqs_unassigned_at_step > 0:
            ol_nr[output_length] = num_reqs_unassigned_at_step
            num_reqs_assigned += num_reqs_unassigned_at_step

        output_length -= 1

 # 理智检查。
 assert sum(ol_nr.values()) == batch_size, \
 ("Number of requests in output-length assignment does not match "
 f"batch-size.\n batch size {batch_size} - "
 f"step requests {step_requests} - assignments {ol_nr}")

 # 检查输出长度是否在[1,numSteps]中。输出长度必须是
 # 至少1个请求必须参与预填充步骤。
 assert all(ol >= 1 and ol <= num_steps for ol in ol_nr), \
 ("Output lengths of requests should be in range "
 f"[1, num-engine-steps].\n batch size {batch_size} - "
 f"step requests {step_requests} - assignments {ol_nr}")

 return ol_nr


def determine_requests_per_step(context: ProfileContext) -> list[int]:

 """
    确定每个引擎步骤应处理的请求数量。
    若设置了 context.num_steps,则所有引擎步骤处理相同数量的请求,
    且输出列表的长度为 context.num_steps。

    若设置了 context.complete_num_requests_per_step,则每个解码步骤
    处理的请求数量逐次递减,直至没有待处理请求。
    此时,输出列表的大小等于处理所有请求所需的步骤数。

    Args:
        context: ProfileContext 对象。

    Returns:
        list[int]: 所有引擎步骤应处理的请求数量列表。
         output[i] 表示第 i 个步骤应处理的请求数量。
    """
 if context.num_steps:
 # 所有请求必须运行,直到 num_engine_steps 为止。这意味着
 # 他们的输出长度必须等于 num_engine_steps。
 return [context.batch_size] * context.num_steps

 assert context.complete_num_requests_per_step and \
                context.complete_num_requests_per_step > 0, \
 (f"Expected a positive complete_num_requests_per_step argument."
 f"Instead got {context.complete_num_requests_per_step}")

 # 我们在第一个解码步骤之后开始掉落。
    step_requests = [
        context.batch_size, # prefill # 预填充
        context.batch_size, # decode # 解码
 ]

    num_running_requests = context.batch_size
    num_running_requests -= context.complete_num_requests_per_step
 while num_running_requests > 0:
        step_requests.append(num_running_requests)
        num_running_requests -= context.complete_num_requests_per_step

 if step_requests[-1] != 1:

 # 在最后一步有1个请求。这通常很有用
        step_requests.append(1)

 return step_requests


def run_profile(context: ProfileContext, csv_output: Optional[str],
                json_output: Optional[str]):
 print("Run profile with:")
 for key, value in asdict(context).items():
 print(f"  {key} = {value}")

    requests_per_step: list[int] = determine_requests_per_step(context)

    ol_nr: OutputLen_NumReqs_Map = compute_request_output_lengths(
        context.batch_size, requests_per_step)

    num_steps_to_profile: int = len(requests_per_step)
    max_output_len: int = max(ol_nr.keys())
 assert max_output_len >= 1

 # 创建采样参数
    sampling_params = SamplingParams(
        temperature=0.8,
        top_p=0.95,
 # max_tokens is set on a per-request basis.
 # MAX_TOKENS 以每次要求设置。
        max_tokens=None,
        ignore_eos=True)

 # 创建 LLM
    llm = LLM(**asdict(context.engine_args))
    batch_size = context.batch_size
    prompt_len = context.prompt_len

    scheduler_config = llm.llm_engine.scheduler_config
    max_model_len = llm.llm_engine.model_config.max_model_len
    max_num_batched_tokens = scheduler_config.max_num_batched_tokens
    max_num_seqs = scheduler_config.max_num_seqs

 if batch_size * prompt_len > max_num_batched_tokens:
 print(f"ERROR: chosen batch_size * prompt_len "
 f"({batch_size} * {prompt_len} = {batch_size * prompt_len}) is  "
 f"larger than max_num_batched_tokens ({max_num_batched_tokens}) "
 f"and therefore cannot be run in a single profile step, please "
 f"choose a smaller batch size or prompt length, or increase "
 f"--max-num-batched-tokens")
        sys.exit(-1)
 if batch_size > max_num_seqs:
 print(
 f"ERROR: chosen batch_size ({batch_size}) is larger than "
 f"max_num_seqs ({max_num_seqs}) and therefore cannot be run in a "
 f"single profile step, please choose a smaller batch size")
        sys.exit(-1)
 print("llm.llm_engine.model_config.max_model_len: ",
          llm.llm_engine.model_config.max_model_len)
 if prompt_len + max_output_len > llm.llm_engine.model_config.max_model_len:
 print(f"ERROR: chosen prompt_len + max_output_len ({prompt_len} + "
 f"{max_output_len} = {prompt_len + max_output_len}) is larger "
 f"than the model's max_model_len ({max_model_len}), please "
 f"choose a smaller prompt_len or max_output_len, or increase "
 f"--max-model-len")
        sys.exit(-1)

 def add_requests():

 def get_output_len_generator() -> Generator[int, Any, Any]:
 for output_len, num_reqs in ol_nr.items():
 for _ in range(num_reqs):
 yield output_len

        output_len_generator = get_output_len_generator()
 for i in range(batch_size):
            sampling_params.max_tokens = next(output_len_generator)
 assert isinstance(sampling_params.max_tokens, int)

            prompt_token_ids = torch.randint(
                llm.llm_engine.model_config.get_vocab_size(),
                size=(prompt_len, )).tolist()

            llm.llm_engine.add_request(
                request_id=f"seq{i}",
                prompt={'prompt_token_ids': prompt_token_ids},
                params=sampling_params)

 def abort_requests():
 for i in range(batch_size):
            llm.llm_engine.abort_request(f"seq{i}")

 # 预热跑步
 print("Warm up run ...")
    add_requests()
    llm.llm_engine.step() # Prefill
    llm.llm_engine.step() # Decode
    abort_requests()

 print("Profile run ...")
    add_requests()

 with layerwise_profile() as prefill_prof:
        llm.llm_engine.step() # First step is prefill

    decode_profs = []
 for _ in tqdm.tqdm(range(num_steps_to_profile - 1)):
        num_running_seqs = llm.llm_engine.scheduler[
 0].get_num_unfinished_seq_groups()
 with layerwise_profile(
                num_running_seqs=num_running_seqs) as decode_prof:
            llm.llm_engine.step()
        decode_profs.append(decode_prof)

    decode_results_list = [prof.results for prof in decode_profs]
    prefill_results = prefill_prof.results
    has_decode = len(decode_results_list) > 0

    LINE_WIDTH = 80
 print("=" * LINE_WIDTH)
 print(f"= Prefill Model Table "
 f"(prompt_len={prompt_len}, batch_size={batch_size})")
 print("=" * LINE_WIDTH)
 print()
    prefill_results.print_model_table()

 if has_decode:
 print()
 print("=" * LINE_WIDTH)
 print(f"= First Decode Step Model Table "
 f"(prompt_len={prompt_len}, batch_size={batch_size})")
 print("=" * LINE_WIDTH)
 print()
        decode_results_list[0].print_model_table()

 print()
 print("=" * LINE_WIDTH)
 print(f"= Prefill Summary Table "
 f"(prompt_len={prompt_len}, batch_size={batch_size})")
 print("=" * LINE_WIDTH)
 print()
    prefill_results.print_summary_table()

 if has_decode:
 print()
 print("=" * LINE_WIDTH)
 print(f"= First Decode Step Summary Table "
 f"(prompt_len={prompt_len}, batch_size={batch_size})")
 print("=" * LINE_WIDTH)
 print()
        decode_results_list[0].print_summary_table()

 if csv_output:
        csv_filename_base = csv_output[:-4] \
 if csv_output.endswith('.csv') else csv_output
        prefill_results.export_model_stats_table_csv(
            csv_filename_base + "_prefill_model_table.csv")
        prefill_results.export_summary_stats_table_csv(
            csv_filename_base + "_prefill_summary_table.csv")

 if has_decode:
            decode_results_list[0].export_model_stats_table_csv(\
                csv_filename_base + "_decode_model_table.csv")
            decode_results_list[0].export_summary_stats_table_csv(
                csv_filename_base + "_decode_summary_table.csv")

 if json_output:
        cuda_devices = [
            torch.cuda.get_device_properties(dev_idx)
 for dev_idx in range(torch.cuda.device_count())
 ]

        json_dict = {
 "context": {
 "python_version": f"{sys.version}",
 "torch_version": f"{torch.__version__}",
 "torch_cuda_version": f"{torch.version.cuda}",
 "cuda_devices": f"{cuda_devices}",
 **asdict(context)
 },
 "prefill": prefill_results.convert_stats_to_dict(),
 }

 if has_decode:
 for idx, dr in enumerate(decode_results_list):
                json_dict[f"decode_{idx + 1}"] = dr.convert_stats_to_dict()

 # 如果尚不存在,则将.json 添加到 JSON_OUTPUT 文件名。
        json_output_file = json_output if json_output.endswith(
 '.json') else json_output + '.json'
 with open(json_output_file, "w+") as f:
            json.dump(json_dict, f, indent=2)
 pass

 if context.save_chrome_traces_folder is not None:
        os.makedirs(context.save_chrome_traces_folder, exist_ok=True)
        prefill_prof.profiler.export_chrome_trace(
            context.save_chrome_traces_folder + "/prefill.json")
 for idx, decode_prof in enumerate(decode_profs):
            decode_prof.profiler.export_chrome_trace(
                context.save_chrome_traces_folder + f"/decode_{idx + 1}.json")
 print("Traces saved as prefill.json and decode_1.json, etc."
 f" in folder {context.save_chrome_traces_folder}")


if __name__ == "__main__":
    parser = FlexibleArgumentParser(description="""
Profile a model

    example:
    ```
    python examples/offline_inference/profiling.py \
        --model neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8 --batch-size 4 \
        --prompt-len 512 --max-num-batched-tokens 8196 --json Llama31-8b-FP8 \
        --enforce-eager run_num_steps -n 2
    ```

    then you can use various tools to analyze the json output
    terminal ascii tables:
        ```
        python tools/profiler/print_layerwise_table.py \
            --json-trace Llama31-8b-FP8.json --phase prefill --table summary
        ```
    or create matplotlib stacked bar charts:
        ```
        python tools/profiler/visualize_layerwise_profile.py \
            --json-trace Llama31-8b-FP8.json \
            --output-directory profile_breakdown --plot-metric pct_cuda_time
        ```
""",
formatter_class=RawTextHelpFormatter)
parser.add_argument(
"--csv",
type=str,
default=None,
help="Export the results as multiple csv file. This should be the root "
"filename, will create <filename>_prefill_model_table.csv, "
"<filename>_prefill_summary_table.csv, "
"<filename>_decode_model_table.csv, and "
"<filename>_decode_summary_table.csv")
parser.add_argument(
"--json",
type=str,
default=None,
help="Export the results as a json file. This should be the filename")
parser.add_argument("--save-chrome-traces-folder",
type=str,
help="Save chrome traces for the prefill and decode "
"will save traces as prefill.json and decode_1.json, "
"etc. inside this folder")
parser.add_argument(
"--prompt-len",
type=int,
default=PROMPT_LEN_DEFAULT,
help=f"Length of the random prompt to use when profiling, all batched "
f"requests use the same prompt_len, default={PROMPT_LEN_DEFAULT}")
parser.add_argument("--batch-size",
type=int,
default=BATCH_SIZE_DEFAULT,
help=f"Number of requests to run as a single batch, "
f"default={BATCH_SIZE_DEFAULT}")
subparsers = parser.add_subparsers(dest="cmd")
run_num_steps_parser = subparsers.add_parser(
"run_num_steps",
help="This variation profiles n engine.step() invocations.")
run_num_steps_parser.add_argument(
'-n',
'--num-steps',
type=int,
help="Number of engine steps to profile.\n"
"Setting it to 1, profiles only the prefill step.\n"
"Setting it to 2, profiles the prefill and first decode step\n"
"Setting it to 3, profiles the prefill, 1st and 2nd decode steps\n"
"and so on ...")
run_to_completion_parser = subparsers.add_parser(
"run_to_completion",
help="This variation profiles all the engine.step() invocations"
"until the engine exhausts all submitted requests.")
run_to_completion_parser.add_argument(
'-n',
'--complete-num-requests-per-step',
type=int,
help=
"Complete complete_num_requests_per_step requests every decode step."
"For e.g., with batch_size 128 and complete_num_requests_per_step 32,"
"the profiler is run for 6 engine steps, with the steps processing, "
"128, 128, 96, 64, 32, 1 requests respectively.\n"
"Note that we tack-on a one-request step at the end as it is often "
"useful.")
EngineArgs.add_cli_args(parser)
args = parser.parse_args()
context = ProfileContext(
engine_args=EngineArgs.from_cli_args(args),
**{
k: v
for k, v in vars(args).items()
if k in inspect.signature(ProfileContext).parameters
})
run_profile(context, csv_output=args.csv, json_output=args.json)
vllm 参数介绍 一个重要参数enable-prefix-caching 特殊场景会提高很大性能。详细建视频:https://www.toutiao.com/video/7355331984845734435/?channel=&source=search_tabBelow, you can find an explanation of every engine argument for vLLM:--model Name or path of the huggingface mode 阅读详情

相关推荐

【vLLM-性能洞察】从Timeline到模块分析:利用Profiling透视大模型推理全栈瓶颈

本文深入探讨了利用vLLM-Profiling工具进行大模型推理全栈性能分析的方法与实践。通过Timeline可视化、算子关联分析和硬件效能统计,系统性地识别计算空泡、内存墙和调度开销等典型瓶颈,并提供从数据采集到优化策略的完整解决方案,帮助开发者显著提升NPU环境下的推理效率。

weixin_42524308的博客 221

【vLLM-性能调优】vLLM场景下Profiling使用指导与能力汇总

摘要: vLLM-Ascend是针对昇腾NPU优化的高性能推理框架,集成Ascend PyTorch Profiler性能分析工具,支持全栈性能数据采集。通过环境变量或API控制Profiling开关,开发者可采集PyTorch算子、CANN软件栈及NPU硬件层的执行数据,支持离线推理、在线服务及性能基准测试场景。框架提供灵活的配置参数,包括采集级别(Level0-Level2)、AI Core指标及内存分析等,帮助精准定位性能瓶颈。详细使用说明和参数配置可参考昇腾官方文档,实现模型推理的深度优化。

AiChiMomo的博客 2519

Ansys CFX Pre 中 RGP 表的高级配置与优化策略

本文深入探讨了Ansys CFX Pre中RGP表的高级配置与优化策略,旨在帮助用户将仿真从“能用”提升至“精准好用”。文章重点解析了如何根据具体仿真场景,科学设定温度压力范围、选择流体类型,并针对相变等复杂工况实施网格加密与分离建表等关键优化技术,以显著提升计算精度与稳定性。

weixin_29216957的博客 1180

Vllm-Ascend与Mindie-LLM的Profiling分析对比

创建docker容器(可选)安装Mindie-Turbo配置环境变量创建推理python脚本vim run.py这里使用Qwen2.5-7B进行对比,填入如下脚本,可根据实际情况调整prompts执行python脚本如果能够成功推理,进入如下路径执行如下指令采集Profiling由于在docker环境内,采集的Profiling数据由于权限问题无法导出,执行如下指令更改文件夹及文件夹内所有文件的权限。

DanteQiu62的博客 1404

HFSS15 win10_64位破解

HFSS15 win10_64位破解 找到的别人的软件,但在首次安装时失败了,并不能patched。寻找了几种方法,已成功安装。在此写下安装经验,供大家参考。 软件安装包以及破解软件: 链接:https://pan.baidu.com/s/1MMjV_31maU5QD6fmI4zfIA 提取码:yj4q 在安装之前,建议关闭杀毒软件。 Step1:进入HFSS150Win64安装包,点击au...

玉笙寒 4万+

PHP+MYSQL宠物主题动态网页设计源码+数据库,大学生期末大作业,PHP课程设计

PHP+MYSQL宠物主题动态网页设计源码+数据库,大学生期末大作业,PHP课程设计提示:本文采用PHP对数据库进行操作:本文就介绍了PHP实现对MySQL数据库的增删改查操作基础内容。

900

vLLM 性能分析

vLLM性能分析指南 本文介绍了vLLM框架的两种性能分析方法: PyTorch Profiler:通过设置VLLM_TORCH_PROFILER_DIR环境变量启用,支持记录张量形状、内存、堆栈等数据,建议少量请求测试。分析文件可通过Perfetto可视化。 NVIDIA Nsight Systems:提供底层CUDA分析,需安装后使用nsys profile命令,支持离线推理和服务端分析,结果可通过GUI或命令行查看。 注意事项: 性能分析仅限开发者使用,会显著降低推理速度 大模型分析数据写入耗时较长(

2428

2.设置Salesforce开发环境

Salesforce DX:salesforce Developer Experience (salesforce开发人员体验)LWC:Lightning Web Component(注意首字母是大写的,是一个概念,小写的话有组件本身的含义)CLI:Command Line Interface(命令行界面)version control system (VCS):版本控制系统。

nihaixiao的博客 2198

【vLLM 学习】Simple Profiling

更多 vLLM 中文文档及教程可访问 →https://hyper.ai/notebooks/37048?vLLM 是一款专为大语言模型推理加速而设计的框架,实现了 KV 缓存内存几乎零浪费,解决了内存管理瓶颈问题。源码 examples/offline_inference/simple_profiling.py。

HyperAI超神经 433

绿标短网址app.10086.cn/xxxxx移动短网址缩短接口网址api调用php方式解析

绿标短网址app.10086.cn/xxxxx 移动网缩短接口网址api调用php方式解析 app.10086.cn是移动网站的接口,可以制作移动网等第三方官方网站域名的任意生成接口,由于是认证企业,可以再抖音 微信 qq等第三方渠道正常打开不拦截提示,第三方网址,头条文章等,效果非常号,这里记录下api接口,纯技术php生成,具体规则可以去抖音的开放平台去申请对应接口 。这里用我php模拟抓包获取方式 GET http://www.app10086cn.cn/?i=app.10068.cnHTTP/1.1

qq_20300095的博客 5908

别再手动上传了!用宝塔面板的‘Let‘s Encrypt’免费SSL证书,3分钟自动续期

本文详细介绍了如何利用宝塔面板的‘Let‘s Encrypt’功能实现SSL证书的自动申请和续期,3分钟完成配置即可永久免费使用。通过对比不同SSL证书方案,突出Let's Encrypt的免费、自动续期和高安全性优势,特别适合个人博客和中小企业官网。

weixin_30415113的博客 150

基于VeRL框架在Atlas 800T A2上打通DeepSeek-671B DAPO强化学习训练流程实践

本文介绍了在Atlas 800T A2集群上实现DeepSeek-671B-R1-Zero模型DAPO强化学习训练的技术方案。针对大模型参数量大、结构复杂的特点,采用vLLM-Ascend推理引擎和Megatron训练后端并行适配的策略,通过权重转换、推理EP使能、Skip_rollout优化等关键技术,解决了显存溢出、精度对齐等问题。实践表明,该方法显著提升了训练效率,最终实现端到端性能达标,为后续大模型强化学习训练提供了可行技术路线。

Master_Ketation的博客 260

国密SKF库数字签名全解析:SM2签名与验证的详细实现

本文详细解析了基于国密SKF库实现SM2数字签名与验证的全过程。内容涵盖SKF库环境搭建、设备初始化、PIN码验证、SM2签名生成以及纯软件与SKF库两种验证方式的详细实现,为开发者提供了一份实用的国密算法开发指南。

weixin_29303701的博客 323

CyberStrikeAI 快速上手指南:从零到首次 AI 安全测试任务的完整实战

CyberStrikeAI 是一个用 Go 编写的 AI 原生安全测试平台,把自然语言指令翻译成受治理的安全工具执行,让证据沉淀为攻击链与漏洞记录,在可审计的工作空间里完成渗透测试全流程。 ## 项目速览 CyberStrikeAI 把规划、执行、人工监督、证据、回放连成一条完整的链路:基于 Eino 的代理编排引擎驱动 100+ 工具的 YAML 配方,结果自动进入漏洞生命周期与攻击链图谱,

gitblog_00198的博客 221

书旗app字符串加密分析

本文案例是对书旗app搜索接口的请求密文进行分析和逆向。

李玺 3156

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

模型部署优化全指南:从剪枝量化到推理加速的工程实践

深度学习模型从训练完成到真正上线,往往要跨越显存不足、延迟超标、吞吐低下等重重障碍。模型压缩与推理加速因此成为工程落地的关键环节。量化技术通过将FP32权重转为INT8甚至INT4,借助Tensor Core等硬件加速单元实现数倍提速;结构剪枝则剔除冗余通道,在降低计算量的同时配合微调恢复精度。而推理引擎如TensorRT、ONNX Runtime和torch.compile,则通过算子融合、图优化等手段进一步释放硬件潜力。这些技术组合应用,能在目标设备上实现数倍性能提升。无论是边缘部署还是服务端推理,理解

weixin_42552637的博客 318

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

dcu上profiling vllm

在海光dcu平台上抓取vllm profiler

u010643777的专栏 171

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Qwen3-VL-8B实战教程:vLLM profiling性能分析与GPU kernel耗时定位方法

本文介绍了如何在星图GPU平台上自动化部署Qwen3-VL-8B AI 聊天系统Web镜像,实现多模态图文理解与交互式AI聊天。通过平台一键部署,用户可快速构建支持图像上传、内容描述、视觉问答等典型场景的智能对话应用,显著降低多模态大模型落地门槛。

weixin_42504649的博客 1023

vLLM Ascend 性能与调试实战指南:Benchmark、系统调优、Profiling 与 msprobe 精度定位

本篇技术指南面向在华为昇腾(Ascend)NPU 上部署 vLLM 服务的开发者,系统讲解 vLLM Ascend 社区插件(vllm-ascend)在[性能与调试专题](https://link.gitcode.com/i/4ed74aff4739d3f1bf4d1cf216154303)下的四条主线:性能基准测试(Benchmark)、系统级优化与调优、服务框架 Profiling、以及基于

gitblog_00423的博客 888

【vLLM 学习】vLLM TPU 分析

vLLM 是一款专为大语言模型推理加速而设计的框架,实现了 KV 缓存内存几乎零浪费,解决了内存管理瓶颈问题。更多 vLLM 中文文档及教程可访问 →源码此脚本用于分析 vLLM 在特定预填充(prefill)或解码(decode)令牌形状下的 TPU 性能表现。注意:实际运行的服务器会混合处理多种形状的预填充和解码请求。假设您已在使用 TPU 环境(本测试基于 TPU v6e)并已按照完成 vLLM 安装。

HyperAI超神经 550

AI Profiling实战:如何定位vLLM推理服务的显存泄漏问题?附完整排查步骤

本文中 SysOM 为阿里云操作系统控制台运维组件。AI Profiling 作为 SysOM 中智算运维功能之一,主要聚焦 AI 作业的性能分析场景。

阿里巴巴云原生的博客 273

Qwen3-4B-Thinking-GGUF镜像实操:如何导出vLLM profiling数据优化推理瓶颈

本文介绍了如何在星图GPU平台上自动化部署Qwen3-4B-Thinking-2507-GPT-5-Codex-Distill-GGUF镜像,并详细阐述了通过导出和分析vLLM的profiling数据来定位并优化模型推理瓶颈的方法。该镜像作为一款高效的文本生成模型,可广泛应用于智能对话、代码生成等场景,帮助开发者提升AI应用的响应速度与性能。

weixin_28988985的博客 333

通义千问Embedding模型性能瓶颈?Profiling分析实战指南

本文介绍了如何在星图GPU平台上自动化部署通义千问3-Embedding-4B-向量化模型镜像,高效支撑知识库语义检索场景。通过动态上下文配置与显存优化,显著降低embedding延迟并提升吞吐,适用于文档切块、RAG问答等典型AI应用。

weixin_42506884的博客 671

从服务化推理和统一训练架构,到veRL异步profiling改造

Model Engine和Rollout Engine的重构让veRL 在0.7版本产生了很多的变化,本文系统整理了他们的重构实现和改造过程,同时为veRL的profiling系统进行了对应的异步改造,相关工作已被收录到veRL的Q1 Roadmap。自由讨论详情veRL在0.7版本经历了比较多的变化,也慢慢看到了一个灵活、可扩展的强化学习训练框架正在不断完善和形成。本文介绍了一下veRL在这个转变的过程中,他的推理和训练引擎的一些变化,希望给相关开发人员提供一些参考资料。

h_2025的博客 1033

昇腾NPU训练性能优化实战:从Profiling到INT8量化的部署指南

在深度学习模型向昇腾NPU迁移时,性能瓶颈往往源于底层架构差异而非硬件本身。昇腾采用达芬奇架构,通过Cube、Vector、Scalar三个单元分别处理矩阵运算、逐元素操作和控制逻辑,与GPU的通用计算核心存在本质区别。因此,将模型高效部署到昇腾环境,需要理解NPU的计算形态、存储层次以及算子下发模式。从工程实践角度看,性能优化是一个系统性工程:先通过msprof等工具完成算子级性能剖析,定位Host侧与Device侧的瓶颈分布;再针对容器部署时的环境配置、动态Shape导致的编译开销、以及INT8量化前后

weixin_33806300的博客 395

Qwen3.5 MoE结构拆解和profiling分析

2026年,千问发布了Qwen3.5系列模型,其中MoE模型参数量更大,语义理解能力更强,同时由于每次前向计算只激活少量专家,推理速度有所保障。本文将围绕Qwen3.5模型的MoE部分展开,内容包括参数分析、结构分析、vllm实现流程和profiling拆解方法。本文基于transforms仓和vllm、vllm-ascend框架代码分析,请以官方代码仓为准。transformers仓中的Qwen3_5MoeSpareMoeBlock是MoE层的实现类。计算流程如图2所示。

qq_41907803的博客 673
上一篇: 【Triton 教程】triton_language.store
下一篇: 【TVM教程】设计与架构
HyperAI超神经
博客等级 码龄7年 8873粉丝 1753原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值