网站建设费应怎样做会计分录王烨飞

张小明 2026/1/19 20:26:15
网站建设费应怎样做会计分录,王烨飞,在线制作动态图片自动生成,做网站建设的怎么拓展业务vLLM 是一款专为大语言模型推理加速而设计的框架#xff0c;实现了 KV 缓存内存几乎零浪费#xff0c;解决了内存管理瓶颈问题。 更多 vLLM 中文文档及教程可访问 →vllm.hyper.ai/ *在线运行 vLLM 入门教程#xff1a;零基础分步指南 源码 examples/offline_inference/p…vLLM 是一款专为大语言模型推理加速而设计的框架实现了 KV 缓存内存几乎零浪费解决了内存管理瓶颈问题。更多 vLLM 中文文档及教程可访问 →vllm.hyper.ai/*在线运行 vLLM 入门教程零基础分步指南源码 examples/offline_inference/profiling_tpu此脚本用于分析 vLLM 在特定预填充(prefill)或解码(decode)令牌形状下的 TPU 性能表现。注意实际运行的服务器会混合处理多种形状的预填充和解码请求。假设您已在使用 TPU 环境(本测试基于 TPU v6e)并已按照安装指南完成 vLLM 安装。以下所有示例中我们都先进行若干次预热运行(因此使用–enforce-eager参数是可行的)性能分析示例​生成预填充分析数据​此示例运行 Qwen/Qwen2.5-7B-Instruct 模型处理包含1024个输入令牌的单个请求。该设置旨在专门分析预填充阶段的时间和操作。export XLA_HLO_DEBUG1 export MODELQwen/Qwen2.5-7B-Instruct export VLLM_TPU_PROFILE_DURATION_MS3000 export VLLM_TPU_PROFILE_DELAY_MS0 python3 profiling.py \ --model $MODEL \ --input-len 1024 --output-len 1 \ --batch-size 1 --enforce-eager \ --max-model-len 2048 \ --tensor-parallel-size 1 \ --profile-result-dir profiles生成解码分析数据​此示例运行 Llama 3.1 70B 模型处理32个并行请求的批次每个请求包含1个输入令牌和128个输出令牌。通过设置极小的1个令牌预填充并配置VLLM_TPU_PROFILE_DELAY_MS1000跳过前1秒的推理(预计是预填充阶段)专门分析32个并行解码过程。export XLA_HLO_DEBUG1 export MODELmeta-llama/Llama-3.1-70B-Instruct export VLLM_TPU_PROFILE_DURATION_MS2000 export VLLM_TPU_PROFILE_DELAY_MS1000 rm -rf ~/.cache/vllm/xla_cache python3 profiling.py \ --model $MODEL \ --input-len 1 \ --output-len 128 \ --batch-size 32 \ --enforce-eager \ --profile-result-dir profiles \ --max-model-len 2048 --tensor-parallel-size 8可视化分析结果​收集到性能分析数据后您可以使用TensorBoard进行可视化分析。需要安装的依赖项通常包括pip install tensorflow-cpu tensorboard-plugin-profile etils importlib_resourcesThen you just need to point TensorBoard to the directory where you saved the profiles and visithttp://localhost:6006/in your browser: 然后只需将TensorBoard指向保存分析数据的目录并在浏览器中访问http://localhost:6006/tensorboard --logdir profiles/ --port 6006示例材料profiling.py​# SPDX-License-Identifier: Apache-2.0 import argparse import dataclasses import os import time import numpy as np import torch_xla.debug.profiler as xp from tqdm import tqdm from vllm import LLM, SamplingParams from vllm.engine.arg_utils import EngineArgs from vllm.inputs import PromptType from vllm.utils import FlexibleArgumentParser DURATION_MS int(os.getenv(VLLM_TPU_PROFILE_DURATION_MS, 3000)) DELAY_MS int(os.getenv(VLLM_TPU_PROFILE_DELAY_MS, 0)) def main(args: argparse.Namespace): print(args) engine_args EngineArgs.from_cli_args(args) llm LLM(**dataclasses.asdict(engine_args)) server xp.start_server(9012) # noqa: F841 sampling_params SamplingParams( temperature0.0, ignore_eosTrue, max_tokensargs.output_len, ) print(sampling_params) dummy_prompt_token_ids np.random.randint(10000, size(args.batch_size, args.input_len)) dummy_prompts: list[PromptType] [{ prompt_token_ids: batch } for batch in dummy_prompt_token_ids.tolist()] def run_to_completion(): start_time time.perf_counter() llm.generate(dummy_prompts, sampling_paramssampling_params, use_tqdmFalse) end_time time.perf_counter() latency end_time - start_time return latency # Warmup # 预热 print(Warming up...) warmup_latencies [] for _ in tqdm(range(args.num_iters_warmup), descWarmup iterations): warmup_latencies.append(run_to_completion()) print(fAverage warmup latency: {np.mean(warmup_latencies):.4f}s) # Profile # 分析 profile_dir args.profile_result_dir print(fProfiling (results will be saved to {profile_dir})...) # Enable tracing on server # 在服务器上启用跟踪 xp.trace_detached(localhost:9012, profile_dir, delay_msDELAY_MS, duration_msDURATION_MS) if DELAY_MS 0: time.sleep(1.0) profile_latencies [] for _ in tqdm(range(args.num_iters), descProfile iterations): profile_latencies.append(run_to_completion()) print(fAverage profile latency: {np.mean(profile_latencies):.4f}s) return if __name__ __main__: parser FlexibleArgumentParser( descriptionBenchmark the latency of processing a single batch of requests till completion.) parser.add_argument(--input-len, typeint, default32) parser.add_argument(--output-len, typeint, default128) parser.add_argument(--batch-size, typeint, default8) parser.add_argument(--num-iters-warmup, typeint, default5, helpNumber of iterations to run for warmup.) parser.add_argument(--num-iters, typeint, default1, helpNumber of iterations to run for profiling.) parser.add_argument( --profile-result-dir, typestr, defaultprofiles, help (path to save the pytorch profiler output. Can be visualized with ui.perfetto.dev or Tensorboard (https://cloud.google.com/tpu/docs/pytorch-xla-performance-profiling-tpu-vm). )) parser EngineArgs.add_cli_args(parser) args parser.parse_args() main(args)
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

网站开发师2022年今天新闻联播

方法: 右键单击文件选择properties 选择open with 中的use a custom command 找到软件安装位置,把路径填写在上面即可. 查看指定软件安装位置 打开终端,输入 where is 软件名称即可显示软件安装路径。

张小明 2026/1/17 19:08:35 网站建设

深圳建设网站公司网页设计与制作考试题及答案

PyTorch中使用nvidia-smi监控GPU利用率的方法详解 在深度学习模型训练过程中,你是否遇到过这样的场景:CPU 占用率飙到 100%,而 GPU 利用率却始终徘徊在个位数?或者训练突然崩溃,提示“CUDA out of memory”&#xff0c…

张小明 2026/1/17 19:08:34 网站建设

wordpress网站同步插件建个营销型网站多少钱

如何快速掌握计算机编码原理:程序员必读的完整指南 【免费下载链接】编码---隐匿在计算机软硬件背后的语言.上高清PDF下载 《编码---隐匿在计算机软硬件背后的语言.上》 高清 PDF 下载 项目地址: https://gitcode.com/open-source-toolkit/2c344 想要真正理解…

张小明 2026/1/17 19:08:35 网站建设

多用户网站建设方案c 购物网站开发流程

Hutool(糊涂工具类)是一个开源的Java工具库,旨在简化Java开发中的常见操作。它整合了各类实用工具类,封装了JDK常用功能,并提供了以下核心特性: 核心功能模块 工具类整合 文件操作:FileUtil&…

张小明 2026/1/17 19:08:36 网站建设

微网站开发 培训厦门网站推广

在建筑给水、工业增压、锅炉补水以及市政配套工程中,cdl/cdlf 立式多级离心泵是一类应用非常成熟的设备。 由于使用场景广、运行周期长,这类泵在选型阶段,往往更容易被工程项目重点关注。但在实际采购过程中,很多用户都会遇到同一…

张小明 2026/1/17 19:08:36 网站建设

百度怎么提交网站地图网站视频下载windows

PDF智能导航工具终极指南:三分钟让无结构文档变身有序电子书 【免费下载链接】pdf-bookmark pdf bookmark generator 目录 书签 大纲 项目地址: https://gitcode.com/gh_mirrors/pd/pdf-bookmark 还在为PDF文档缺乏目录而苦恼?PDF智能导航工具正是…

张小明 2026/1/17 19:08:37 网站建设