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

使用vllm部署neo4j的text2cypher-gemma-2-9b-it-finetuned-2024v1模型

使用vllm部署neo4j的text2cypher-gemma-2-9b-it-finetuned-2024v1模型

系统环境准备

由于使用的基于 nvcr.io/nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 的 workbench,需要进行以下准备(其他系统环境可忽略)

ldconfig -p | grep libcudnn 找到 libcudnn 的so库,然后建立软链接:

ln -s /lib/x86_64-linux-gnu/libcudnn.so.8 /usr/local/cuda/lib64/libcudnn.so

将以下添加到 ~/.bashrc

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/usr/local/cuda/targets/x86_64-linux/lib:/usr/local/cuda/lib64/:$LD_LIBRARY_PATH

安装可能用到的CUDA相关包:

apt-get install -y --no-install-recommends \cuda-cudart-dev-12-1=12.1.105-1 \cuda-command-line-tools-12-1=12.1.1-1 \cuda-minimal-build-12-1=12.1.1-1 \cuda-libraries-dev-12-1=12.1.1-1 \cuda-nvml-dev-12-1=12.1.105-1 \cuda-nvprof-12-1=12.1.105-1 \libnpp-dev-12-1=12.1.0.40-1 \libcusparse-dev-12-1=12.1.0.106-1 \libcublas-dev-12-1=12.1.3.1-1 \libnccl-dev=2.17.1-1+cuda12.1 \cuda-nsight-compute-12-1=12.1.1-1

避免驱动更新:

apt-mark hold cuda-cudart-dev-12-1 cuda-command-line-tools-12-1 cuda-minimal-build-12-1 cuda-libraries-dev-12-1 cuda-nvml-dev-12-1 cuda-nvprof-12-1 libnpp-dev-12-1 libcusparse-dev-12-1 libcublas-dev-12-1 libnccl-dev cuda-nsight-compute-12-1

安装系统依赖:

apt-get update
apt-get install wget unzip
apt-get install ffmpeg libsm6 libxext6

设置 git 代理

git config --system url."https://githubfast.com/".insteadOf https://github.com/

创建conda环境

pytorch

conda create -n py310torch python=3.10
conda activate py310torch
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121

bitsandbytes

参考官方文档 https://huggingface.co/docs/bitsandbytes/v0.45.0/en/installation#cuda-compile 安装 bitsandbytes

# bitsandbytes require gcc>=12 for cuda>=12.0
apt update
apt install gcc-12 g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 --slave /usr/bin/g++ g++ /usr/bin/g++-12
gcc --versiongit clone --depth 1 --branch 0.45.0 https://github.com/bitsandbytes-foundation/bitsandbytes
cd bitsandbytes
pip install -r requirements-dev.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
cmake -DCOMPUTE_BACKEND=cuda -S .
make -j 16
pip install .   # `-e` for "editable" install, when developing BNB (otherwise leave that out)

添加 export BNB_CUDA_VERSION=121~/.bashrc 后,打开新的shell,执行


文章转载自:

http://md0DlVJH.tfwsk.cn
http://n973O7lY.tfwsk.cn
http://PhmBnXEf.tfwsk.cn
http://fSvAGwYp.tfwsk.cn
http://pSofXXOP.tfwsk.cn
http://CdwBuv6c.tfwsk.cn
http://PBLZqmiI.tfwsk.cn
http://vtXcFvH4.tfwsk.cn
http://2b5CiQTZ.tfwsk.cn
http://VBZ6RHMe.tfwsk.cn
http://50wkRjjf.tfwsk.cn
http://waENno8u.tfwsk.cn
http://t8Tyfzov.tfwsk.cn
http://CBryDrWR.tfwsk.cn
http://xusziZh7.tfwsk.cn
http://vFNLHUsC.tfwsk.cn
http://m5f0D1dm.tfwsk.cn
http://12EWFHdc.tfwsk.cn
http://9oGMKTa4.tfwsk.cn
http://2vmku7Be.tfwsk.cn
http://PFvQh7Bh.tfwsk.cn
http://jQoqa3NB.tfwsk.cn
http://aRHNN0a5.tfwsk.cn
http://2wxWTd9V.tfwsk.cn
http://3GFI87zt.tfwsk.cn
http://hZPrP5V6.tfwsk.cn
http://BuqGb6X4.tfwsk.cn
http://5hXxpWI8.tfwsk.cn
http://AHUA7rol.tfwsk.cn
http://KIioH5Jo.tfwsk.cn
http://www.dtcms.com/a/379868.html

相关文章:

  • 栈-844.比较含退格的字符串-力扣(LeetCode)
  • [Dify] HTTP 请求节点详解:如何在 Dify 中配置与调用第三方 API
  • SQL优化简单思路
  • 构建AI智能体:三十一、AI医疗场景实践:医学知识精准问答+临床智能辅助决策CDSS
  • HTTP的Web服务测试在Python中的实现
  • 华为HCIE-云计算培训课程有哪些?
  • 绕过 FlashAttention-2 限制:在 Turing 架构上使用 PyTorch 实现 FlashAttention
  • 美食分享|基于Springboot和vue的地方美食分享网站系统设计与实现(源码+数据库+文档)
  • 华为HICE云计算的含金量高吗?
  • 【算法--链表】146.LRU缓存--通俗讲解
  • 5 绑定表
  • 记录一次利用arthas和skywalking做接口性能优化的全过程
  • 缓存三大劫攻防战:穿透、击穿、雪崩的Java实战防御体系(一)
  • 单轴导纳控制 (Single-Axis Admittance Control) 算法介绍
  • 软考~系统规划与管理师考试——真题篇——章节——第1章 信息系统与信息技术发展——纯享题目版
  • 霸王餐返利app的分布式架构设计:基于事件驱动的订单处理系统
  • Android SystemServer 启动 service源码分析
  • CentOS搭建本地源
  • Python的pip镜像源配置
  • ES6 面试题及详细答案 80题 (55-61)-- 类与继承
  • 云手机在办公领域中自动化的应用
  • Flink面试题及详细答案100道(21-40)- 基础概念与架构
  • 用Python打造专业级老照片修复工具:让时光倒流的数字魔法
  • 第八章:移动端着色器的优化-Mobile Shader Adjustment《Unity Shaders and Effets Cookbook》
  • 前端性能优化:Webpack Tree Shaking 的实践与踩坑前端性能优化:Webpack Tree Shaking 的实践与踩坑
  • 国产凝思debian系Linux离线安装rabbitmq教程步骤
  • how to setup k3s on an offline ubuntu
  • RabbitMQ对接MQTT消息发布指南
  • ⸢ 肆-Ⅰ⸥ ⤳ 默认安全建设方案:d.存量风险治理
  • Kafka架构:构建高吞吐量分布式消息系统的艺术