当前位置: 首页 > wzjs >正文

毕业设计代做网站唯一seo咨询服务价格

毕业设计代做网站唯一,seo咨询服务价格,培训网站建设方案,网页制作基础教程我的足球网《OpenShift / RHEL / DevSecOps 汇总目录》 说明:本文已经在 OpenShift 4.18 OpenShift AI 2.19 的环境中验证 文章目录 什么是 ModelCar构建模型镜像在 OpenShift AI 使用模型镜像部署模型扩展速度对比 参考 什么是 ModelCar KServe 典型的模型初始化方法是从 S…

《OpenShift / RHEL / DevSecOps 汇总目录》
说明:本文已经在 OpenShift 4.18 + OpenShift AI 2.19 的环境中验证

文章目录

  • 什么是 ModelCar
  • 构建模型镜像
  • 在 OpenShift AI 使用模型镜像
    • 部署模型
    • 扩展速度对比
  • 参考

什么是 ModelCar

KServe 典型的模型初始化方法是从 S3 Bucket 获取模型。由于每次初始化都要下载模型文件,这一过程对于小型模型来说是可行的,但对于大型模型来说就成了性能瓶颈,因为在自动扩展的过程中会大大延迟启动时间。

ModelCar 是 KServe 为应对这一问题的方案,它具备以下突出优势:

  • 模型文件已放在容器镜像中,当镜像在节点中已被缓存的时候,可避免重复下载模型文件,从而可显著减少模型启动的延迟。
  • 因为在节点上运行相同模型的 pod 将访问同一镜像,无需在每个 pod 中下载模型数据,因此可减少本地磁盘空间的使用。

构建模型镜像

  1. 创建下载模型的文件 download_model.py。
$ cat > download_model.py << EOF
from huggingface_hub import snapshot_download# Specify the Hugging Face repository containing the model
model_repo = "Qwen/Qwen2.5-0.5B-Instruct"
snapshot_download(repo_id=model_repo,local_dir="/models",allow_patterns=["*.safetensors", "*.json", "*.txt"],
)
EOF
  1. 创建构建镜像的文件 Containerfile。
$ cat > Containerfile << EOF
FROM registry.access.redhat.com/ubi9/python-311:latest as baseUSER rootRUN pip install huggingface-hub# Download the model file from hugging face
COPY download_model.py .RUN python download_model.py # Final image containing only the essential model files
FROM registry.access.redhat.com/ubi9/ubi-micro:9.4# Copy the model files from the base container
COPY --from=base /models /modelsUSER 1001
EOF
  1. 构建包含模型的镜像。
podman build . -t modelcar-example:latest --platform linux/amd64
  1. 将镜像推送到 Registry。
$ podman images localhost/modelcar-example
REPOSITORY                  TAG         IMAGE ID      CREATED         SIZE
localhost/modelcar-example  latest      ae4aac72bb2c  59 minutes ago  1.02 GB$ podman push localhost/modelcar-example quay.io/your-registry/modelcar-example:latest

在 OpenShift AI 使用模型镜像

部署模型

  1. 按下图创建一个使用镜像作为源的 connection。
    在这里插入图片描述
  2. 使用以上 connection 部署模型。将 Deployment mode 设为 Advanced,即使用 Serverless 运行模型;Number of model server replicas to deploy 设为 0,即初始运行副本数为零。
    在这里插入图片描述

扩展速度对比

结合《OpenShift AI - 在 OpenShift 和 OpenShift AI 上运行 LLM》中基于 S3 的模型部署模式,在同一环境中对 ModelCar 和 S3 方式运行的 ibm-granite/granite-3.2-2b-instruct 模型进行同时扩展。测试结果:

  • ModelCar 模式的扩展时间:1分12秒,明显快。
  • S3 模式的扩展时间:2分22秒。

参考

https://developers.redhat.com/articles/2025/01/30/build-and-deploy-modelcar-container-openshift-ai#modelcar_containers_pros_and_cons
https://github.com/redhat-ai-services/modelcar-catalog
https://opendatahub.io/docs/serving-models/
https://github.com/redhat-ai-services/modelcar-catalog/tree/main/modelcar-images/qwen2.5-0.5b-instruc

http://www.dtcms.com/wzjs/203772.html

相关文章:

  • 制作学校网站的教程学大教育一对一收费价格表
  • 网站开发网页前置开发seo网络营销技术
  • wordpress删除空标签广州网站优化关键词排名
  • wordpress ping通告网站seo诊断工具
  • 杭州最便宜的网站建设站长百度
  • 网站建设 前期资料百度seo软件首选帝搜软件
  • 用旧手机做网站创建个人网站的流程
  • 网站建设的技巧数字经济发展情况报告
  • 好的网站设计题目百度网站检测
  • 做网站什么是解析什么是跳转人工智能的关键词
  • 山东网站建设运营汕头seo排名
  • 售卖网站建设实验报告百度新闻网
  • 丹东黄页网seo sem
  • 好建网站长沙网站关键词排名公司
  • 学网站建设基础seo和竞价排名的区别
  • 深圳社区网站开发公司如何在网上推广自己的公司
  • 多少企业需要网站建设品牌运营
  • 哪家网站专做女性服装深圳建站公司
  • 延边州网站建设微信管理
  • seo服务商排名seo引擎优化服务
  • 创建网站站点seo智能优化系统
  • 文件网站建设郑州短视频代运营
  • wordpress 字体 插件苏州seo安严博客
  • 新型冠状病毒肺炎疫情关键词优化报价查询
  • 做网站需要多少兆空间深圳平台推广
  • 网站备案在哪里找广州网站优化服务
  • 做网站需要多久代运营靠谱吗
  • 彭州建设局网站上海百度seo网站优化
  • 哪个网站做美食视频网页自动点击软件
  • 网站建设需要软件中国新冠疫情最新消息