【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的博客 223

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

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

AiChiMomo的博客 2557

从零构建:Esp32+Esp-IDF驱动ST7789屏幕并集成LVGL图形库

本文详细介绍了如何从零开始使用Esp32和Esp-IDF驱动ST7789屏幕并集成LVGL图形库。内容涵盖环境准备、SPI驱动配置、屏幕初始化、LVGL图形库集成及常见问题排查,帮助开发者快速实现高效稳定的显示解决方案。

weixin_42657024的博客 529

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

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

DanteQiu62的博客 1428

AIDD-人工智能药物设计-构建基于机器学习方法的在线预测平台高准确预测药物诱导骨毒性

在此基础上,提取多种药物分子特征,包括分子指纹(如MACCS、Morgan、RDKit、TopologicalTorsion、AtomPairs与Descriptors)及分子图谱,通过Transformer编码器与神经网络进行机器学习模型训练。最后,将训练好的模型部署为在线Web服务器(BoneToxPD),供用户快速预测药物的骨毒性。本研究不仅在骨毒性预测的准确性方面取得了突破,还在模型解释性方面提供了新的视角,通过注意力机制精准识别出影响骨毒性的关键化学基团,推动药物研发领域更安全、更高效的发展。

itwangyang520的博客 1087

别再为域名备案发愁了!微信小程序后端调用,试试这个‘官方捷径’——云托管

本文介绍了微信小程序后端部署的新思路——利用微信云托管服务绕过域名备案难题。通过详细的环境准备、数据库配置、服务部署和小程序端调用方案,帮助开发者快速实现小程序与后端服务的无缝对接,大幅缩短上线周期并降低运维成本。

weixin_29243279的博客 699

vLLM 性能分析

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

2440

抓包工具:Fiddler下载、安装、使用 教程

文章目录抓包工具:Fiddler下载、安装、使用 教程一、Fiddler 下载二、Fiddler 安装三、Fiddler 使用3、Statistics 请求的性能数据分析4、Inspectors 查看数据内容5、AutoResponder 允许拦截指定规则的请求6、Composer 自定义请求发送服务器7、Filters 请求过滤规则8、Timeline 请求响应时间9、Fiddler 设置解密HTTPS的网络数据10、Fiddler 内置命令与断点 抓包工具:Fiddler下载、安装、使用 教程 Fidd

Sumarua的博客 17万+

【vLLM 学习】Simple Profiling

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

HyperAI超神经 434

《open3D+pyqt》点云读取、显示与保存

《open3D+pyqt》第一章:点云读取与显示一、效果展示二、环境配置三、代码3.1 qt designer设置3.2 生成ui,qrc的py文件3.3 py文件代码 一、效果展示 二、环境配置 环境配置:Anconda+pycharm+pyqt+open3d+pyqtgraph 显示界面:这里选择pyqtgraph 参考网上教程 三、代码 3.1 qt designer设置 界面布局参照《PCL+QT》教程,界面设置:布局如下: 布局参数参考: 3.2 生成ui,qrc的py文件 3.3 py

阁楼 7119

YOLOv11改进策略【独家融合改进】| MobileNetV4+BiFPN,轻松实现降参涨点,适用专栏内所有的骨干替换

可扩展的高效物体检测BiFPN(加权双向特征金字塔网络)

Limiiiing的博客 2367

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

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

Master_Ketation的博客 277

高通 vs MTK vs 海思:三大平台 ISP 架构横向对比与实战差异分析

随着移动影像能力成为智能终端差异化竞争的核心维度,ISP(Image Signal Processor)架构日益重要。高通、MTK、海思三大 SoC 厂商在 ISP 设计上各具特色,不仅在图像处理链路、模块集成度、算法加速路径等方面存在显著差异,同时也决定了终端厂商在成像质量、调试复杂度与扩展能力上的实际表现。本文将基于真实平台项目经验,横向对比三大主流平台的 ISP 架构关键指标,系统分析其在实际开发过程中的能力边界、工程成本与调优空间,帮助工程师更精准地进行平台选型与优化策略制定。

努力分享一些人工智能、计算机视觉、影像等相关的知识干货! 3957

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

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

gitblog_00198的博客 222

Vue3 - Element Plus 组件库 Tabs 标签页右侧区域插入按钮,<el-tabs> / <el-tab-pane> 选项卡组件右侧自定义插槽内容教程(右边区域添加自定义按钮功能区)

vue3,elementplus,tabs选项卡如何在插槽按钮,tabs标签页组件怎么自定义右侧内容,vue3elementplustabs组件右侧插槽按钮,element-plus在el-tabs组件的最右侧添加按钮,如何在选项卡右边加入按钮搜索框等内容,哪个属性能在tab选项卡右侧插入自定义按钮,在el-tabs组件最右侧添加按钮,vue3el-tabs组件怎么自定义右侧插槽内容,Tabs标签页右侧自定义插槽,ElementPlusTab右边加按钮,el-tabs组件自定义右侧按钮,在E

🏆 前端领域优质创作者 7031

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

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

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

weixin_42552637的博客 329

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

dcu上profiling vllm

在海光dcu平台上抓取vllm profiler

u010643777的专栏 179

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

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

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

weixin_42504649的博客 1027

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

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

gitblog_00423的博客 914

【vLLM 学习】vLLM TPU 分析

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

HyperAI超神经 552

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

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

阿里巴巴云原生的博客 280

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

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

weixin_28988985的博客 339

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

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

weixin_42506884的博客 674

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

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

h_2025的博客 1042

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

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址