llama.cpp:Linux_x86端测试Qwen2.5-Omni


目录


.

1.环境需要

以下是经实验验证可行的环境参考,也可尝试其他版本。

(1)PC:Ubuntu 22.04.4

(2)软件环境:如下表所示

工具 版本 安装
cmake 3.26.0 conda install -c conda-forge cmake ; conda install -c conda-forge c-compiler ; conda install -c conda-forge cxx-compiler
make 4.4.1 conda install -c conda-forge make
git 2.34.1 sudo apt-get update ; sudo apt-get install git
git-lfs 3.6.0 sudo apt-get install git-lfs
CURL sudo apt update ; sudo apt install libcurl4-openssl-dev

.

2.构建项目

(1)克隆项目:

Shell 复制代码
git lfs install
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp

(2)PC构建:

Shell 复制代码
cmake -B build
cmake --build build --config Release

(3)下载文件:

去hf-mirror.com下载gguf模型,以Qwen2.5-Omni-3B为例:

Shell 复制代码
# https://hf-mirror.com/ggml-org/Qwen2.5-Omni-3B-GGUF/tree/main
# 方式一:手动下载每个文件
# 方式二:命令下载(待补充)
下载模型到./Model/Qwen2.5-Omni-3B-GGUF/路径下

将你想推理的img.png和audio.wav放到./Data目录。

.

3.PC测试

运行模型:

shell 复制代码
./build/bin/llama-mtmd-cli \
    -m ./Model/Qwen2.5-Omni-3B-GGUF/Qwen2.5-Omni-3B-Q8_0.gguf \
    --mmproj ./Model/Qwen2.5-Omni-3B-GGUF/mmproj-Qwen2.5-Omni-3B-Q8_0.gguf \

测试:

shell 复制代码
......
main: loading model: ./Model/Qwen2.5-Omni-3B-GGUF/Qwen2.5-Omni-3B-Q8_0.gguf

 Running in chat mode, available commands:
   /image <path>    load an image
   /audio <path>    load an audio
   /clear           clear the chat history
   /quit or /exit   exit the program

> /image ./Data/img.png
./Data/img.png image loaded

>  图中是什么目标
encoding image slice...
image slice encoded in 22695 ms
decoding image batch 1/1, n_tokens_batch = 784
image decoded (batch 1/1) in 8743 ms

图中是一只可爱的卡通老鼠。

> /audio ./Data/audio.wav
./Data/audio.wav audio loaded

> 将音频转文字
encoding audio slice...
audio slice encoded in 5840 ms
decoding audio batch 1/1, n_tokens_batch = 750
audio decoded (batch 1/1) in 9680 ms

Hello, everyone. My name is Omni demo. This is demo test. 这是一个测试。一个中文参数测试。一个omni的样例测试。

> 四大名著是哪些?

四大名著是《红楼梦》、《西游记》、《水浒传》和《三国演义》。

.


声明:资源可能存在第三方来源,若有侵权请联系删除!

相关推荐
RuoyiOffice4 天前
llama.cpp + SpringBoot3:本地部署 Qwen3.8,接入 AgentOS 企业办公智能体
spring boot·springboot3·llama.cpp·spring ai·qwen3.8·agentos
AI_Gump8 天前
模型篇|llama.cpp 推理引擎深度解读:从一人练手到 LLM 端侧的事实标准
llama·llama.cpp
智码看视界11 天前
开源大模型追踪:TurboQuant量化指南:128K上下文不再爆显存,KV缓存3-bit免重训
google·开源大模型·llama.cpp·显存优化·长上下文推理·turboquant·本地部署 开源大模型
神奇的代码在哪里15 天前
没有独显也能跑多模态:MiniCPM-V 4.7-1B 本地 OCR 实测(附源码)
ocr·多模态大模型·llama.cpp·gguf·minicpm-v
容沁风16 天前
llama.cpp浏览器访问404
win10·llama.cpp·web-ui
n1121225 天前
4G 显存老显卡怎么跑模型:llama.cpp 加 GGUF 配置
llama·llama.cpp·本地大模型·gguf
半甜柠檬1 个月前
llama.cpp 部署 Qwen3.8-27B:无独显轻薄本实测
大模型·qwen·量化·本地部署·llama.cpp
智码看视界1 个月前
开源大模型前沿:Baichuan 5 :单卡 H100 跑国产,长上下文 + 中文 Agentic 硬刚海外同档
开源·中文·llama.cpp·百川智能·国产大模型·baichuan 5
阆遤2 个月前
llama.cpp 0.4.0-dev 本地编译指南
ai·编译·llama.cpp
JiMoKuangXiangQu2 个月前
在 AllWinner T507 上部署 Qwen2.5-0.5B 大语言模型
人工智能·llama.cpp·推理引擎