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

大模型学习与实践笔记(九)

一、LMDeply方式部署

使用 LMDeploy 以本地对话方式部署 InternLM-Chat-7B 模型,生成 300 字的小故事

2.api 方式部署

运行

结果:

显存占用:

二、报错与解决方案

在使用命令,对lmdeploy 进行源码安装是时,报错

1.源码安装语句

pip install 'lmdeploy[all]==v0.1.0'

2.报错语句:

Building wheels for collected packages: flash-attnBuilding wheel for flash-attn (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py bdist_wheel did not run successfully.│ exit code: 1╰─> [9 lines of output]fatal: not a git repository (or any of the parent directories): .gittorch.__version__  = 2.0.1running bdist_wheelGuessing wheel URL:  https://github.com/Dao-AILab/flash-attention/releases/download/v2.4.2/flash_attn-2.4.2+cu118torch2.0cxx11abiFALSE-cp310-cp310-linux_x86_64.whlerror: <urlopen error Tunnel connection failed: 503 Service Unavailable>[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for flash-attnRunning setup.py clean for flash-attn
Failed to build flash-attn
ERROR: Could not build wheels for flash-attn, which is required to install pyproject.toml-based projects

3.解决方法

(1)在https://github.com/Dao-AILab/flash-attention/releases/ 下载对应版本的安装包

(2)通过pip 进行安装

pip install flash_attn-2.3.5+cu117torch2.0cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

4.参考链接

https://github.com/Dao-AILab/flash-attention/issues/224

http://www.lryc.cn/news/284340.html

相关文章:

  • fpga目前就业形势咋样?
  • Linux7 安装 Oracle 19C RAC 详细图文教程
  • 【SpringBoot】SpringBoot 项目初始化方法
  • 34. 在排序数组中查找元素的第一个和最后一个位置(二分查找)
  • Mysql深度分页优化的一个实践
  • 【JavaEE进阶】 SpringBoot配置⽂件
  • excel 常用函数
  • 【React基础】– JSX语法
  • SpringBoot 项目中后端实现跨域的5种方式!!!
  • Vue3前端开发,provide和enject的基础练习,跨层级传递数据
  • Python 循环结构值while循环
  • MSSQL-识别扩展extended event(扩展事件)中的时间单位
  • vue3中l和vue2中v-model不同点
  • 使用 Swift 代码优化项目编译速度
  • 基于springboot+vue的社区团购系统(前后端分离)
  • three.js从入门到精通系列教程002 - three.js正交相机OrthographicCamera
  • Golang 搭建 WebSocket 应用(七) - 性能、可用性
  • Qt 状态机框架:The State Machine Framework (一)
  • 高通平台学习一
  • Python爬虫时被封IP,该怎么解决?四大动态IP平台测评
  • 积分梳状滤波器CIC原理与实现
  • 【项目管理】CMMI-原因分析与解决过程(CAR)
  • 【设计模式】文件目录管理是组合模式吗?
  • 利用appium自动控制移动设备并提取数据
  • day22_236二叉树最近公共祖先_235二叉搜索树(最近公共祖先_701插入一个节点_450删除一个节点)
  • OpenSource - 工具管理器easy-manager-tool
  • Laravel7 + easyWeChat 实现微信公众号支付功能
  • Linux环境下,针对QT软件工程搭建C++Test单元测试环境的操作指南
  • 16k+ start 一个开源的的监控系统部署教程
  • Mermaid使用教程(绘制各种图)