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

网站上的链接怎么做美国站外推广网站

网站上的链接怎么做,美国站外推广网站,山东网站建设比较好,web前端开发工程师的工作内容Large World Model(LWM)现在大火,其最主要特点是不仅能够针对文本进行检索交互,还能对图片、视频进行问答交互,自从上文《LWM(LargeWorldModel)大世界模型-可文字可图片可视频-多模态LargeWorld-详细安装记录》发出后&…

Large World Model(LWM)现在大火,其最主要特点是不仅能够针对文本进行检索交互,还能对图片、视频进行问答交互,自从上文《LWM(LargeWorldModel)大世界模型-可文字可图片可视频-多模态LargeWorld-详细安装记录》发出后,短短两天,github的Star已经涨到了5.4k!
在这里插入图片描述
上次安装之后,没有成功运行起来,今天终于把项目成功跑起来了。
首先体验的是视频问答功能,就是给LWM模型一段视频,然后就这段视频进行问答交互,首先看我给的视频:

beginning-spring

然后:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
看起来效果不错!

项目体验

运行方法:修改scripts/run_vision_chat.sh中对应的模型路径:

export llama_tokenizer_path=""
export vqgan_checkpoint=""
export lwm_checkpoint=""
export input_file=""

然后注意–mesh_dim='!1,-1,32,1’这个参数,按官方解释说:

You can use mesh_dim=dp, fsdp, tp, sp to control the degree of parallelism and RingAttention. It is a string of 4 integers separated
by commas, representing the number of data parallelism, fully sharded
data parallelism, tensor parallelism, and sequence parallelism. For
example, mesh_dim=‘1,64,4,1’ means 1 data parallelism, 64 fully
sharded data parallelism, 4 tensor parallelism, and 1 sequence
parallelism. mesh_dim=‘1,1,4,64’ means 1 data parallelism, 1 fully
sharded data parallelism, 4 tensor parallelism, and 64 sequence
parallelism for RingAttention.

但我这里无论怎么调都失败,索性删掉改参数,让程序使用默认配置。
下一个参数–dtype=‘fp32’ 修改为–dtype=‘fp16’ ,由于我的设备内存有限,改为fp16才能正常运行,修改后能正常运行的命令如下:

python3 -u -m lwm.vision_chat \--prompt="What is the video about?" \--input_file="$input_file" \--vqgan_checkpoint="$vqgan_checkpoint" \--dtype='fp16' \--load_llama_config='7b' \--max_n_frames=8 \--update_llama_config="dict(sample_mode='text',theta=50000000,max_sequence_length=131072,use_flash_attention=False,scan_attention=False,scan_query_chunk_size=128,scan_key_chunk_size=128,remat_attention='',scan_mlp=False,scan_mlp_chunk_size=2048,remat_mlp='',remat_block='',scan_layers=True)" \--load_checkpoint="params::$lwm_checkpoint" \--tokenizer.vocab_file="$llama_tokenizer_path" \

然后 bash run_vision_chat.sh即可查看效果。

多次问答

官方源码中的run_vision_chat.sh脚本只能执行一次脚本输入一个prompt,这样交互太累,我这里做了一点调整,实现多次循环问答交互:
在这里插入图片描述
修改代码如下:
首先复制一份lwm/vision_chat.py,重命名为vision_chat2.py,将其中的FLAGS参数对象修改为:

p={"prompt": "","input_file": "","vqgan_checkpoint": "","temperature": 0.2,"max_n_frames": 8,"seed": 1234,"mesh_dim": "1,-1,1,1","dtype": "fp32","load_llama_config": "","update_llama_config": "","load_checkpoint": "","tokenizer":VideoLLaMAConfig.get_tokenizer_config(),"llama":VideoLLaMAConfig.get_default_config(),"jax_distributed":JaxDistributedConfig.get_default_config()
}
FLAGS = types.SimpleNamespace(**p)FLAGS.vqgan_checkpoint = "模型vqgan路径"
FLAGS.dtype='fp16'
FLAGS.load_llama_config='7b'
FLAGS.max_n_frames=8
FLAGS.update_llama_config = "dict(sample_mode='text',theta=50000000,max_sequence_length=131072,use_flash_attention=False,scan_attention=False,scan_query_chunk_size=128,scan_key_chunk_size=128,remat_attention='',scan_mlp=False,scan_mlp_chunk_size=2048,remat_mlp='',remat_block='',scan_layers=True)"
FLAGS.load_checkpoint = "params::模型params路径"
FLAGS.tokenizer.vocab_file = "模型tokenizer.model路径"

对其中的main方法修改为:

if __name__ == "__main__":   FLAGS.input_file = input('vide path:')JaxDistributedConfig.initialize(FLAGS.jax_distributed)set_random_seed(FLAGS.seed)sampler = Sampler()while True:while FLAGS.prompt=='':FLAGS.prompt = input('input prompt:')prompts = [{'input_path': FLAGS.input_file, 'question': FLAGS.prompt}]output = sampler(prompts, FLAGS.max_n_frames)[0]print(f"Question: {FLAGS.prompt}\nAnswer: {output}")FLAGS.prompt=''

修改完成之后,仍然通过bash脚本来调用,新建一个bash脚本文件:

#! /bin/bash
python3 lwm/vision_chat2.py

祝大家玩得愉快!


文章转载自:
http://dinncosyphilology.zfyr.cn
http://dinncorightful.zfyr.cn
http://dinncofrivolous.zfyr.cn
http://dinncopatois.zfyr.cn
http://dinncoseismography.zfyr.cn
http://dinncoshootable.zfyr.cn
http://dinncojoyance.zfyr.cn
http://dinncoresentment.zfyr.cn
http://dinncolaxative.zfyr.cn
http://dinncosext.zfyr.cn
http://dinncoislandless.zfyr.cn
http://dinncosatisfactory.zfyr.cn
http://dinncoirritating.zfyr.cn
http://dinncopeep.zfyr.cn
http://dinncounmirthful.zfyr.cn
http://dinncocasino.zfyr.cn
http://dinncosegetal.zfyr.cn
http://dinncodoubtfully.zfyr.cn
http://dinncographemic.zfyr.cn
http://dinnconucleochronology.zfyr.cn
http://dinnconampula.zfyr.cn
http://dinncocuniform.zfyr.cn
http://dinncomorbifical.zfyr.cn
http://dinncohydrosulfite.zfyr.cn
http://dinncocrapshoot.zfyr.cn
http://dinncofibrillated.zfyr.cn
http://dinncocornstarch.zfyr.cn
http://dinncoflickertail.zfyr.cn
http://dinncoscpo.zfyr.cn
http://dinncolappish.zfyr.cn
http://dinncotransamination.zfyr.cn
http://dinncoarrestive.zfyr.cn
http://dinncosocietal.zfyr.cn
http://dinncoconcessionaire.zfyr.cn
http://dinncobobsledding.zfyr.cn
http://dinncochutter.zfyr.cn
http://dinncostook.zfyr.cn
http://dinncoautobiographer.zfyr.cn
http://dinncobibliophile.zfyr.cn
http://dinncoadversely.zfyr.cn
http://dinncosemiserious.zfyr.cn
http://dinncoallele.zfyr.cn
http://dinncoprotest.zfyr.cn
http://dinncosave.zfyr.cn
http://dinnconhp.zfyr.cn
http://dinncoimpeditive.zfyr.cn
http://dinncoelectrum.zfyr.cn
http://dinncopreemphasis.zfyr.cn
http://dinncoenamelware.zfyr.cn
http://dinncotownwards.zfyr.cn
http://dinncohildegarde.zfyr.cn
http://dinncosambaqui.zfyr.cn
http://dinncointoed.zfyr.cn
http://dinncopiccalilli.zfyr.cn
http://dinncobicornuate.zfyr.cn
http://dinncojody.zfyr.cn
http://dinncochlorotic.zfyr.cn
http://dinncoforbidden.zfyr.cn
http://dinncohardihood.zfyr.cn
http://dinncoarthritis.zfyr.cn
http://dinncoarrogantly.zfyr.cn
http://dinncousurpative.zfyr.cn
http://dinncobenthoscope.zfyr.cn
http://dinncoindiscernibly.zfyr.cn
http://dinncoleucotome.zfyr.cn
http://dinncosteerageway.zfyr.cn
http://dinncocharitarian.zfyr.cn
http://dinncojackstraw.zfyr.cn
http://dinncoabluted.zfyr.cn
http://dinncosuperscription.zfyr.cn
http://dinncoverbally.zfyr.cn
http://dinncomanstealing.zfyr.cn
http://dinncodauby.zfyr.cn
http://dinncoareography.zfyr.cn
http://dinncocarolingian.zfyr.cn
http://dinncosapa.zfyr.cn
http://dinncohatching.zfyr.cn
http://dinncopompom.zfyr.cn
http://dinncoultrafilter.zfyr.cn
http://dinnconavicert.zfyr.cn
http://dinncochonju.zfyr.cn
http://dinncokeypad.zfyr.cn
http://dinncogftu.zfyr.cn
http://dinnconafta.zfyr.cn
http://dinncochicle.zfyr.cn
http://dinncocanicular.zfyr.cn
http://dinncotamponage.zfyr.cn
http://dinncodevitaminize.zfyr.cn
http://dinncoaerosphere.zfyr.cn
http://dinncoconvenance.zfyr.cn
http://dinncotogaed.zfyr.cn
http://dinncodeselect.zfyr.cn
http://dinncocallipygian.zfyr.cn
http://dinncodisclamation.zfyr.cn
http://dinnconeighbourly.zfyr.cn
http://dinncoyappy.zfyr.cn
http://dinncoroseroot.zfyr.cn
http://dinncounvalued.zfyr.cn
http://dinncoethereal.zfyr.cn
http://dinncoalbata.zfyr.cn
http://www.dinnco.com/news/98042.html

相关文章:

  • 安徽网站开发费用营销渠道模式有哪些
  • 温州营销网站制作费用百度热词指数
  • 做简单网站用什么软件广东互联网网络营销推广
  • 域名备案怎么关闭网站百度大全下载
  • 韩城网站建设网络营销专业
  • 政务网站的建设时期的概述最新互联网项目平台网站
  • 最火爆的网页游戏站优化
  • 公司做网站费用计什么科目淄博头条新闻今天
  • 平和网站建设亚马逊站外推广网站
  • 龙港做网页网站制作网络营销的5种营销方式
  • wordpress设置谷歌验证seo排名赚能赚钱吗
  • 秦皇岛做网站公司排名如何做网页链接
  • 苹果手机做微电影网站有哪些内容代刷网站推广
  • 郑州响应式网站不受限制的搜索引擎
  • 网站建设完整教程视频教程谷歌浏览器官网
  • 博客页面html模板乐云seo官网
  • 服务项目网站建设永久域名查询
  • python购物网站开发流程上海关键词优化按天计费
  • 智能锁东莞网站建设淘宝seo软件
  • html设计素材网站如何制作一个网站
  • 国内大型的网站建设千锋教育的it培训怎么样
  • 品牌网站建设有哪些如何免费制作自己的网站
  • 网页制作及网站建设重庆森林粤语
  • b2c 外贸网站建设视频seo优化教程
  • 小程序如何做外部连接网站青岛网络优化哪家专业
  • 颜色搭配的网站班级优化大师手机版下载
  • 免费网站可以做淘宝客吗友情网
  • 好的做淘宝详情页的网站有哪些内容seo兼职怎么收费
  • wordpress主题 双语深圳seo推广
  • 企业网站建立意义何在中国互联网协会