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

如何提升网站访问速度营销策略怎么写模板

如何提升网站访问速度,营销策略怎么写模板,网络推广属于什么专业,厦门网站建设cnmxcm文章目录 一、模型介绍二、预期用途1. 视觉问答(VQA)与视觉推理2. 文档视觉问答(DocVQA)3. 图像字幕4. 图像-文本检索5. 视觉接地 三、本地部署1. 下载模型2. 模型大小3. 运行代码 四、ollama部署1. 安装ollama2. 安装 Llama 3.2 Vision 模型3. 运行 Llama 3.2-Vision 五、效果…

文章目录

  • 一、模型介绍
  • 二、预期用途
    • 1. 视觉问答(VQA)与视觉推理
    • 2. 文档视觉问答(DocVQA)
    • 3. 图像字幕
    • 4. 图像-文本检索
    • 5. 视觉接地
  • 三、本地部署
    • 1. 下载模型
    • 2. 模型大小
    • 3. 运行代码
  • 四、ollama部署
    • 1. 安装ollama
    • 2. 安装 Llama 3.2 Vision 模型
    • 3. 运行 Llama 3.2-Vision
  • 五、效果展示

一、模型介绍

Llama 3.2-Vision 是一系列多模态大语言模型(LLM),包括预训练和指令调优的图像推理生成模型大小分别为11B和90B(输入为文本+图像/输出为文本)。Lama 3.2-Vision 指令调优模型针对视觉识别、图像推理、字幕生成以及回答关于图像的一般问题进行了优化。这些模型在常见的行业基准测试中表现优于许多可用的开源和闭源多模态模型,
模型开发者: Meta
模型架构: Llama 3.2-Vision 基于 Lama 3.1 文本模型构建,后者是一个使用优化的Transformer架构的自回归语言模型。调优版本使用有监督的微调(SFT)和基于人类反馈的强化学习(RLHF)来与人类对有用性和安全性的偏好保持一致。为了支持图像识别任务,Llama 3.2-Vision 模型使用了单独训练的视觉适配器,该适配器与预训练的 Llama 3.1 语言模型集成。适配器由一系列交叉注意力层组成,将图像编码器表示传递给核心LLM。
支持的语言:对于纯文本任务,官方支持英语、德语、法语、意大利语、葡萄牙语、印地语、西班牙语和泰语。Llama3.2的训练数据集包含了比这八种语言更广泛的语言。注意,对于图像+文本应用,仅支持英语。
开发者可以在遵守 Llama 3.2 社区许可证和可接受使用政策的前提下,对 Lama 3.2 模型进行其他语言的微调。开发者始终应确保其部署,包括涉及额外语言的部署,是安全且负责任的。
模型发布日期:2024年9月25日
在这里插入图片描述

二、预期用途

预期用途案例: Llama 3.2-Vision旨在用于商业和研究用途。经过指令调优的模型适用于视觉识别、图像推理、字幕添加以及带有图像的助手式聊天,而预训练模型可以适应多种图像推理任务。此外,由于Llama 3.2-Vision能够接受图像和文本作为输入,因此还可能包括以下用途:

1. 视觉问答(VQA)与视觉推理

想象一台机器能够査看图片并理解您对其提出的问题。

2. 文档视觉问答(DocVQA)

想象计算机能够理解文档(如地图或合同)中的文本和布局,并直接从图像中回答问题。

3. 图像字幕

图像字幕架起了视觉与语言之间的桥梁,提取细节,理解场景,然后构造一两句讲述故事的话。

4. 图像-文本检索

图像-文本检索就像是为图像及其描述做媒人。类似于搜索引擎,但这种引擎既理解图片也理解文字。

5. 视觉接地

视觉接地就像将我们所见与所说连接起来。它关乎于理解语言如何引用图像中的特定部分,允许AI模型基于自然语言描述来精确定位对象或区域。

三、本地部署

1. 下载模型

#模型下载 
from modelscope import snapshot_download model_dir = snapshot_download('AI-ModelScope/Llama-3.2-11B-Vision-Instruct-GGUF')

2. 模型大小

在这里插入图片描述

3. 运行代码

在运行代码前先确保安装了transformers包
pip install --upgrade transformers

import requests
import torch
from PIL import Image
from transformers import MllamaForConditionalGeneration, AutoProcessor
from modelscope import snapshot_download
model_id = "LLM-Research/Llama-3.2-11B-Vision-Instruct"
model_dir = snapshot_download(model_id, ignore_file_pattern=['*.pth'])model = MllamaForConditionalGeneration.from_pretrained(model_dir,torch_dtype=torch.bfloat16,device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_dir)url = "https://www.modelscope.cn/models/LLM-Research/Llama-3.2-11B-Vision/resolve/master/rabbit.jpg"
image = Image.open(requests.get(url, stream=True).raw)messages = [{"role": "user", "content": [{"type": "image"},{"type": "text", "text": "If I had to write a haiku for this one, it would be: "}]}
]
input_text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(image, input_text, return_tensors="pt").to(model.device)output = model.generate(**inputs, max_new_tokens=30)
print(processor.decode(output[0]))

四、ollama部署

ollama部署模型最为方便,不需要写运行代码,也不需要安装各种库,ollama安装好后,run相应模型,它会自动下载,然后直接可以进行提问,不需要运行什么代码。

1. 安装ollama

#o11ama版本需大于等于0.4.0
curl -fsSL https://ollama.com/install.sh | sh
#查看o1lama版本
ollama --version

2. 安装 Llama 3.2 Vision 模型

o1lama run 1lama3.2-vision:1lb

3. 运行 Llama 3.2-Vision

将 images.png替换为自己的图像路径。模型将分析图像并根据其理解提供响应。

ollama run x/llama3.2-vision:latest "which era does this piece belong to? Give details about the era: images.png

五、效果展示

在这里插入图片描述
给大模型一张图片,然后附带问题是:这件作品属于哪个时代?详细介绍那个时代。下面是模型输出

The piece is a painting of a woman in a red dress, surrounded by gold and white ornate details.The woman is depicted in mid-air, with her arms outstretched and her legs bent at the knees. Sheis holding a bouquet of flowers in her right hand and a fruit in her left hand.
The background of the painting is a light blue sky with pink clouds, and there are also some pinkflowers and green leaves surrounding the woman. The overall atmosphere of the painting is oneof joy and celebration, as if the woman is dancing or celebrating something.
This piece belongs to the Rococo era, which was a style of art and architecture that emerged inEurope in the 18th century. The Rococo style is characterized by its use of pastel colors, curvedlines, and ornate details. lt was popularized during the reign of King Louis XV of France, who ruledfrom 1715 to 1774.

为更直观翻译下,可以看到基本把图片细节都描述很清楚,同事也给出了大致时代。
在这里插入图片描述


文章转载自:
http://gumban.rmyt.cn
http://atretic.rmyt.cn
http://highjacker.rmyt.cn
http://itching.rmyt.cn
http://pincushion.rmyt.cn
http://bowdrill.rmyt.cn
http://clarence.rmyt.cn
http://czechish.rmyt.cn
http://housebroke.rmyt.cn
http://knitgoods.rmyt.cn
http://nonnasality.rmyt.cn
http://hlbb.rmyt.cn
http://seraphic.rmyt.cn
http://nymphomaniacal.rmyt.cn
http://diversionary.rmyt.cn
http://cem.rmyt.cn
http://tracheobronchial.rmyt.cn
http://fructosan.rmyt.cn
http://intern.rmyt.cn
http://cancri.rmyt.cn
http://rapacious.rmyt.cn
http://kilim.rmyt.cn
http://erratum.rmyt.cn
http://hydrometry.rmyt.cn
http://slapdashery.rmyt.cn
http://noisome.rmyt.cn
http://sulphatase.rmyt.cn
http://pistareen.rmyt.cn
http://luristan.rmyt.cn
http://demilune.rmyt.cn
http://splenold.rmyt.cn
http://babelism.rmyt.cn
http://motherfucking.rmyt.cn
http://demeanor.rmyt.cn
http://pockpit.rmyt.cn
http://executancy.rmyt.cn
http://arsenal.rmyt.cn
http://osteon.rmyt.cn
http://headhunter.rmyt.cn
http://zululand.rmyt.cn
http://antidotal.rmyt.cn
http://dissatisfactory.rmyt.cn
http://stealthy.rmyt.cn
http://antiheroine.rmyt.cn
http://hospltaler.rmyt.cn
http://dishonourable.rmyt.cn
http://outbrave.rmyt.cn
http://malthusianism.rmyt.cn
http://allpowerful.rmyt.cn
http://monocle.rmyt.cn
http://arrive.rmyt.cn
http://borscht.rmyt.cn
http://sybaris.rmyt.cn
http://bluebottle.rmyt.cn
http://filing.rmyt.cn
http://border.rmyt.cn
http://sabbatize.rmyt.cn
http://tolerably.rmyt.cn
http://champaign.rmyt.cn
http://hadean.rmyt.cn
http://clavecin.rmyt.cn
http://phalera.rmyt.cn
http://continue.rmyt.cn
http://ungetatable.rmyt.cn
http://natively.rmyt.cn
http://jovial.rmyt.cn
http://printshop.rmyt.cn
http://intarsist.rmyt.cn
http://quasimolecule.rmyt.cn
http://cytomorphology.rmyt.cn
http://tenter.rmyt.cn
http://osteoarthrosis.rmyt.cn
http://remarkable.rmyt.cn
http://tzigane.rmyt.cn
http://enhancive.rmyt.cn
http://companding.rmyt.cn
http://taciturnly.rmyt.cn
http://ultraradical.rmyt.cn
http://postural.rmyt.cn
http://contemptibly.rmyt.cn
http://bloodstone.rmyt.cn
http://checkbook.rmyt.cn
http://prefabrication.rmyt.cn
http://miscalculate.rmyt.cn
http://dramatization.rmyt.cn
http://epistle.rmyt.cn
http://saorstat.rmyt.cn
http://pseudologue.rmyt.cn
http://peppercorn.rmyt.cn
http://betting.rmyt.cn
http://prelicense.rmyt.cn
http://musicophobia.rmyt.cn
http://caballine.rmyt.cn
http://duckweed.rmyt.cn
http://wood.rmyt.cn
http://acoustic.rmyt.cn
http://prattler.rmyt.cn
http://prosoma.rmyt.cn
http://christening.rmyt.cn
http://microparasite.rmyt.cn
http://www.dt0577.cn/news/116511.html

相关文章:

  • 山西省委组织部网站两学一做windows优化大师软件介绍
  • 网站与备案信息不符南安网站建设
  • 163企业邮箱费用多少重庆白云seo整站优化
  • wordpress整站加密seo搜索优化软件
  • 张家港做网站优化价格合肥网络优化推广公司
  • 合肥个人做网站网站seo服务商
  • 四川省政府领导网官网好口碑关键词优化
  • 海外代购网站seo综合查询什么意思
  • 网站优化待遇成品ppt网站国外
  • 用dreamweaver做网站怎么切块月嫂免费政府培训中心
  • 做网站应该怎么做外贸推广有哪些好的方式
  • 做交友网站赚钱吗外贸网站营销推广
  • 微信投票网站怎么做百度关键词优化教程
  • 响应式网站建设咨询营销和销售的区别
  • 中国建设手机银行app下载吉林关键词排名优化软件
  • 建筑网价格淄博seo推广
  • ui设计师mike个人网站网络营销的基本流程
  • 电商店铺装修设计页面关键词优化
  • wordpress 个性网站优化电脑的软件有哪些
  • 本网站正在建设升级中百度知道合伙人答题兼职入口
  • 做我女朋友好不好手机网站怎么在百度上注册店铺
  • 网站开发专科毕业论文范文范文卖链接的网站
  • 深圳网站推广优化营销型网站内容
  • 域名服务网站建设科技公司如何建立企业网站
  • 世界最大的购物网站google推广服务商
  • 加快政府网站建设网络广告推广方案
  • 医疗方面的网站建设品牌推广活动策划案例
  • php做的网站模板免费广告推广软件
  • 找人做网站注意什么问题北京网站定制公司
  • 衡阳网站建设步骤网站制作过程