魔搭社区每周速递(8.11-8.17)

简介: 607个模型、53个数据集、68个创新应用、5篇应用文章

🙋魔搭ModelScope本期社区进展:

📟607个模型:GTE文本向量-多语言系列、mPLUG-Owl3-7B、Idefics3-8B-Llama3等;

📁53个数据集:ChineseChildrenSpeechData、UltraLink、对话-百科(中文)训练集等;

🎨68个创新应用CompassArena 司南大模型竞技场(多模态上新)、通义千问2-VL、LongWriter-glm4-9b-demo、mPLUG-Owl3等;

📄5篇文章:

  • LMDeploy 部署 VLMs 的方法与探讨
  • ModelScope Release Notes 2024-08
  • 更高效的RAG文本检索和排序: 多语言GTE系列模型开源
  • Ollama+Qwen2,轻松搭建支持函数调用的聊天系统
  • Compass Arena上新!新增双多模态模型匿名对战!

精选模型

GTE文本-多语言系列

通义实验室推出了GTE(General Text Embedding)系列文本向量模型,涵盖了基于BERT架构的模型及基于Qwen LLM系列训练的LLM embedding模型,如gte-Qwen2-1.5B-instruct和gte-Qwen2-7B-instruct。

模型链接:

GTE文本向量-多语言-base

https://modelscope.cn/models/iic/gte_sentence-embedding_multilingual-base

GTE文本排序-多语言-base

https://modelscope.cn/models/iic/gte_passage-ranking_multilingual-base

代码示例:

以GTE文本排序-多语言-base为例

import torch
from modelscope import AutoModelForSequenceClassification, AutoTokenizer
model_name_or_path = "iic/gte_passage-ranking_multilingual-base"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = AutoModelForSequenceClassification.from_pretrained(model_name_or_path, trust_remote_code=True)
model.eval()
with torch.no_grad():
    pairs = [["中国的首都在哪儿", "北京"], ["what is the capital of China?", "北京"], ["how to implement quick sort in python?","Introduction of quick sort"]]
    inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=8192)
    scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
    print(scores)
# tensor([1.2315, 0.5923, 0.3041])

更多实战教程详见:

更高效的RAG文本检索和排序: 多语言GTE系列模型开源

mPLUG-Owl3-7B-240728

mPLUG-Owl3 是一种先进的多模态大型语言模型,旨在解决长图像序列理解的挑战,作者提出了Hyper Attention,可以将多模态大型语言模型在长视觉序列理解的速度提高六倍,从而实现处理长达八倍的视觉序列。与此同时,mPLUG-Owl3在单一图像、多图像和视频任务上仍然保持着出色的表现。

模型链接:

https://www.modelscope.cn/models/iic/mPLUG-Owl3-7B-240728

Web-UI代码链接:

https://github.com/X-PLUG/mPLUG-Owl/blob/main/mPLUG-Owl3/gradio_demo.py

Idefics3-8B-Llama3

Idefics3-8B-Llama3是由HuggingFace 研究人员推出的开放多模态模型,为增强文档问答而设计,它接受图像和文本输入的任意序列并生成文本输出。该模型可以回答有关图像的问题、描述视觉内容、创建基于多个图像的故事,或者只是表现为没有视觉输入的纯语言模型。它改进了 Idefics1 和 Idefics2,显著增强了 OCR、文档理解和视觉推理方面的功能。

模型链接:

https://www.modelscope.cn/models/AI-ModelScope/Idefics3-8B-Llama3

代码示例:

import requests
import torch
from PIL import Image
from io import BytesIO
from modelscope import snapshot_download
from transformers import AutoProcessor, AutoModelForVision2Seq
from transformers.image_utils import load_image
DEVICE = "cuda:0"
# Note that passing the image urls (instead of the actual pil images) to the processor is also possible
image1 = load_image("https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg")
image2 = load_image("https://cdn.britannica.com/59/94459-050-DBA42467/Skyline-Chicago.jpg")
image3 = load_image("https://cdn.britannica.com/68/170868-050-8DDE8263/Golden-Gate-Bridge-San-Francisco.jpg")
model_dir = snapshot_download("AI-ModelScope/Idefics3-8B-Llama3")
processor = AutoProcessor.from_pretrained(model_dir)
model = AutoModelForVision2Seq.from_pretrained(
    model_dir, torch_dtype=torch.bfloat16
).to(DEVICE)
# Create inputs
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": "What do we see in this image?"},
        ]
    },
    {
        "role": "assistant",
        "content": [
            {"type": "text", "text": "In this image, we can see the city of New York, and more specifically the Statue of Liberty."},
        ]
    },
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": "And how about this image?"},
        ]
    },       
]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(text=prompt, images=[image1, image2], return_tensors="pt")
inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
# Generate
generated_ids = model.generate(**inputs, max_new_tokens=500)
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
print(generated_texts)

数据集推荐

LongWriter-6k

为解决当前LLM超长文本输出问题,智谱AI推出的最新研究工作LongWriter,提出AgentWrite,使用分而治之的方法和现成的LLM自动构建具有超长输出的SFT数据,并且使用这种方法,构建了LongWriter-6k数据集。

LongWriter-6k数据集包含了6,000条超长输出的SFT(序列到序列Fine-Tuning)数据,这些输出的长度范围在2千到3万2千词之间(包括英文和中文)。该数据集能支持训练大型语言模型(LLMs),以扩展其最大输出窗口大小至1万词以上。

数据集链接:

https://www.modelscope.cn/datasets/ZhipuAI/LongWriter-6k

ChineseChildrenSpeechData

用于178小时中国儿童麦克风语音采集数据数据 中文语音识别模型”模型的测试任务

数据集链接:

https://www.modelscope.cn/datasets/zuosi041116/ChineseChildrenSpeechData

UltraLink

UltraLink是一个多语言、以知识为基础的数据增强、多轮对话数据集。它包含 5 种语言的特定语言聊天数据、与语言无关的聊天数据、代码数据和数学数据:英语、中文、西班牙语、俄语和法语。

数据集链接:

https://www.modelscope.cn/datasets/OmniData/UltraLink

对话-百科(中文)训练集

数据集是一个综合性学术资源,汇集了历史、科技、生活百科、商业智慧、文化娱乐、美食探索及城市导览等多个维度的知识,为学术研究和人工智能应用的开发提供了丰富的素材和启发。

数据集链接:

https://www.modelscope.cn/datasets/qiaojiedongfeng/qiaojiedongfeng

精选应用

CompassArena 司南大模型竞技场(多模态上新)

近日,Compass Arena 迎来重磅更新,新增了多模态大模型竞技版块——Compass Multi-Modal Arena。在这个全新的竞技场,用户可以轻松体验和比较多款主流多模态大模型的效果,找到适合自己的多模态大模型。目前平台已汇集了十余个主流多模态大模型,包括 InternVL2、MiniCPM-V2.5、LLaVANeXT、DeepSeek-VL 等开源模型,以及 Qwen-VL-Max、GLM-4v 等闭源模型。

体验直达:

https://www.modelscope.cn/studios/opencompass/CompassArena

image.png

通义千问2-VL

通义千问2-VL是通义实验室推出的先进视觉-语言模型,擅长理解和生成图像相关的文本,为多模态AI应用提供强大的技术支持。

体验直达:

https://www.modelscope.cn/studios/qwen/Qwen2-VL

LongWriter-glm4-9b-demo

LongWriter-glm4-9b基于glm4-9b训练,一次性可以生成超过10000+文字。

体验直达:

https://www.modelscope.cn/studios/ZhipuAI/LongWriter-glm4-9b-demo

mPLUG-Owl3

由阿里通义实验室X-PLUG团队提出的长序列多模态大语言模型。其可以处理单图、多图、视频等多种图文混合对话模式。

体验直达:

https://www.modelscope.cn/studios/iic/mPLUG-Owl3

社区精选文章


点击链接👇直达原文

https://www.modelscope.cn/headlines/article/625?from=alizishequ__text

相关文章
|
5月前
|
机器学习/深度学习 计算机视觉
顶会速递 | CVPR 2024 魔搭社区模型/创空间盘点(一)
魔搭社区整理了 CVPR 2024中稿论文中在社区上可下载的开源模型、体验Demo的一些工作,给大家带来第一波盘点
|
人工智能 自然语言处理 安全
国内首发,阿里云魔搭社区上架百川智能Baichuan 2系列模型
国内首发,阿里云魔搭社区上架百川智能Baichuan 2系列模型
1045 0
|
1月前
|
人工智能 小程序 云栖大会
魔搭社区@2024云栖大会全回顾
9月21日,2024云栖大会圆满落幕。一起来回顾一下吧
魔搭社区@2024云栖大会全回顾
|
2月前
|
人工智能 自然语言处理 文字识别
魔搭社区每周速递(8.18-8.24)
176个模型、35个数据集、85个创新应用、5篇应用文章
|
3月前
|
机器学习/深度学习 人工智能 自然语言处理
魔搭社区每周速递(7.20-7.26)
174个模型、44个数据集、70个创新应用、5篇应用文章
|
13天前
|
人工智能 语音技术 决策智能
魔搭社区每周速递(9.28-10.12)
503个模型、189个数据集、82个创新应用、9篇应用文章
|
19天前
|
数据采集 人工智能 自然语言处理
魔搭社区每周速递(9.7-9.27)
182个模型、211个数据集、38个创新应用、6篇应用文章
|
1月前
|
机器学习/深度学习 存储 自然语言处理
魔搭社区每周速递(9.1-9.7)
182个模型、211个数据集、38个创新应用、6篇应用文章
魔搭社区每周速递(9.1-9.7)
|
6天前
|
人工智能 自然语言处理 安全
魔搭社区每周速递(10.13-10.19)
503个模型、189个数据集、82个创新应用、9篇应用文章
|
1月前
|
编解码 人工智能 自然语言处理
魔搭社区每周速递(8.25-8.31)
326个模型、82个数据集、71个创新应用、5篇应用文章
魔搭社区每周速递(8.25-8.31)