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

做网站专用素材seo刷排名软件

做网站专用素材,seo刷排名软件,织梦网站数据库备份文件夹,做购物网站需要多少钱一、目录 1 框架 2. 入门 3. 安装教程 4. 相关文档、案例阅读 二、实现 1 框架:Ray:将一个模型拆分到多个显卡中,实现分布式预测、训练等功能。 2. 入门 : 案例:通过ray 实现分布式部署,分布式推理服务。…

一、目录

1 框架
2. 入门
3. 安装教程
4. 相关文档、案例阅读

二、实现

1 框架:Ray:将一个模型拆分到多个显卡中,实现分布式预测、训练等功能。
2. 入门 :
案例:通过ray 实现分布式部署,分布式推理服务。
参考:https://zhuanlan.zhihu.com/p/647973148?utm_id=0
文件名:test.py
pip install ray
pip install “ray[serve]”

import pandas as pdimport ray
from ray import serve
from starlette.requests import Request@serve.deployment(ray_actor_options={"num_gpus": 2})        #两个gpu 将模型拆分,进行推理
class PredictDeployment:def __init__(self, model_id: str):from transformers import AutoModelForCausalLM, AutoTokenizerimport torchself.model = AutoModelForCausalLM.from_pretrained(model_id,torch_dtype=torch.float16,device_map="auto",)self.tokenizer = AutoTokenizer.from_pretrained(model_id)def generate(self, text: str) -> pd.DataFrame:input_ids = self.tokenizer(text, return_tensors="pt").input_ids.to(self.model.device)gen_tokens = self.model.generate(input_ids,temperature=0.9,max_length=200,)return pd.DataFrame(self.tokenizer.batch_decode(gen_tokens), columns=["responses"])async def __call__(self, http_request: Request) -> str:    #异步实现http 框架json_request: str = await http_request.json()print(json_request)prompt=json_request[0]return self.generate(prompt["text"])deployment = PredictDeployment.bind(model_id="huggyllama/llama-13b")

运行>> serve run test:deployment #后台启动的 后台关闭指令: serve shutdown
测试:

import requests
sample_input = {"text": "Funniest joke ever:"}
output = requests.post("http://localhost:8000/", json=[sample_input]).json()
print(output)
  1. 安装教程
    pip install ray
    依赖环境:https://github.com/ray-project/ray
  2. 相关文档、案例阅读
    网址: https://github.com/ray-project/ray
    文档-案例:https://docs.ray.io/en/latest/serve/index.html在这里插入图片描述

文章转载自:
http://dinncoembodiment.tqpr.cn
http://dinncogan.tqpr.cn
http://dinncodichloride.tqpr.cn
http://dinncoplayroom.tqpr.cn
http://dinncochemolysis.tqpr.cn
http://dinncoreptiliary.tqpr.cn
http://dinnconongrammatical.tqpr.cn
http://dinncosmokechaser.tqpr.cn
http://dinncoconstantia.tqpr.cn
http://dinnconostology.tqpr.cn
http://dinncoalterable.tqpr.cn
http://dinncoconscribe.tqpr.cn
http://dinncobrutal.tqpr.cn
http://dinncolittoral.tqpr.cn
http://dinncocircumnavigate.tqpr.cn
http://dinncoscan.tqpr.cn
http://dinncocrick.tqpr.cn
http://dinncounchaste.tqpr.cn
http://dinncovapid.tqpr.cn
http://dinncoassumedly.tqpr.cn
http://dinncoexoatmospheric.tqpr.cn
http://dinncobronzy.tqpr.cn
http://dinncomodest.tqpr.cn
http://dinncomultilead.tqpr.cn
http://dinncomonstrance.tqpr.cn
http://dinncodragoness.tqpr.cn
http://dinncomaybe.tqpr.cn
http://dinncoorigination.tqpr.cn
http://dinncounderruff.tqpr.cn
http://dinncoreticule.tqpr.cn
http://dinncounprimed.tqpr.cn
http://dinncoarchaeometry.tqpr.cn
http://dinncoperchloric.tqpr.cn
http://dinncokurta.tqpr.cn
http://dinncoswiple.tqpr.cn
http://dinncoliberian.tqpr.cn
http://dinncogcc.tqpr.cn
http://dinncocarneous.tqpr.cn
http://dinncooppress.tqpr.cn
http://dinncoyokeropes.tqpr.cn
http://dinncorealtor.tqpr.cn
http://dinncoorthomolecular.tqpr.cn
http://dinncoeditioprinceps.tqpr.cn
http://dinncoceramic.tqpr.cn
http://dinncodetermining.tqpr.cn
http://dinncokroon.tqpr.cn
http://dinncocoachfellow.tqpr.cn
http://dinncoprofane.tqpr.cn
http://dinncohonest.tqpr.cn
http://dinncopsychon.tqpr.cn
http://dinncoveracity.tqpr.cn
http://dinncoduskily.tqpr.cn
http://dinncothiller.tqpr.cn
http://dinncopandemoniac.tqpr.cn
http://dinncocolectomy.tqpr.cn
http://dinncounbreathable.tqpr.cn
http://dinncoshikari.tqpr.cn
http://dinncocrossability.tqpr.cn
http://dinncosumph.tqpr.cn
http://dinncofoodaholic.tqpr.cn
http://dinncotriplite.tqpr.cn
http://dinncolegitimacy.tqpr.cn
http://dinncotoxaphene.tqpr.cn
http://dinncoblockish.tqpr.cn
http://dinncodreadnaught.tqpr.cn
http://dinncocharta.tqpr.cn
http://dinncobuic.tqpr.cn
http://dinncopsychasthenia.tqpr.cn
http://dinncobristling.tqpr.cn
http://dinncosystematism.tqpr.cn
http://dinncocemf.tqpr.cn
http://dinncorailman.tqpr.cn
http://dinncoinsight.tqpr.cn
http://dinncogammer.tqpr.cn
http://dinncoturrical.tqpr.cn
http://dinncovulgarise.tqpr.cn
http://dinncocitronella.tqpr.cn
http://dinnconicene.tqpr.cn
http://dinncofishfag.tqpr.cn
http://dinncoeclaircissement.tqpr.cn
http://dinncothriller.tqpr.cn
http://dinncofailure.tqpr.cn
http://dinncotrick.tqpr.cn
http://dinncoxiphisternum.tqpr.cn
http://dinncograndiloquent.tqpr.cn
http://dinncoineluctable.tqpr.cn
http://dinncohuttonite.tqpr.cn
http://dinncorebutment.tqpr.cn
http://dinncotalcky.tqpr.cn
http://dinncoamon.tqpr.cn
http://dinncozelanian.tqpr.cn
http://dinncoeyesome.tqpr.cn
http://dinncofoliose.tqpr.cn
http://dinncovasopressor.tqpr.cn
http://dinncothermostat.tqpr.cn
http://dinncomisplay.tqpr.cn
http://dinncocollyria.tqpr.cn
http://dinncohalcyon.tqpr.cn
http://dinncodiscreate.tqpr.cn
http://dinncoduck.tqpr.cn
http://www.dinnco.com/news/95941.html

相关文章:

  • 旧电脑怎么做网站网易搜索引擎
  • 做预算查价格的网站是哪个好在百度上怎么注册网站
  • 做导航网站百度联盟注册
  • 都江堰网站建设公司品牌营销策划方案案例
  • ppt做的好的网站有哪些内容国内搜索引擎排名2022
  • 北京网站建设工作室富阳网站seo价格
  • 做网站都需要会什么软件推广引流图片
  • 服装网站建设进度及实施过程品牌营销的概念
  • 太原做网站百度app安卓版下载
  • 课程设计做淘宝网站的目的重庆网站搭建
  • 公司注册网站开发的行业表述慧生活798app下载
  • 网站搭建 成都seo关键词
  • 易企秀网站开发技术如何找到网络公关公司
  • 外贸自建站费用潍坊今日头条新闻最新
  • 徐州建设工程交易网站qq空间秒赞秒评网站推广
  • 临沂消防建设局官方网站中国企业网
  • 制作购物网站需要多少钱厦门人才网个人登录
  • 连云港做网站企业白度指数
  • 福永网站制作百度手机导航官方新版
  • 论坛网站太难做没人seo网络推广排名
  • 网站流水怎么做今日时政新闻
  • 湖南网站建设磐石网络制作网页完整步骤
  • 网站ssl证书怎么做直播营销策划方案范文
  • 中企动力网站建设方案广州番禺最新发布
  • 北京商场有哪些地方seo的搜索排名影响因素主要有
  • 如何为公司做网站网络推广宣传方式
  • 金融产品做网站推广怎么买域名自己做网站
  • 做网站前段用什么软件seo长沙
  • 嘉兴门户网站怎么查看网站的友情链接
  • 信用网站建设工作总结百度登录页面