使用 vllm 本地部署 cohere 的 command-r

0. 引言

此文章主要介绍使用 使用 vllm 本地部署 cohere 的 command-r。

1. 安装 vllm

创建虚拟环境,

conda create -n myvllm python=3.11 -y
conda activate myvllm

安装 Ray 和 Vllm,

pip install ray vllm

安装 flash-attention,

git clone https://github.com/Dao-AILab/flash-attention; cd flash-attention
pip install flash-attn --no-build-isolation

2. 本地部署 cohere 的 command-r

eval "$(conda shell.bash hook)"
conda activate myvllm
CUDA_VISIBLE_DEVICES=3,2,1,0
python -m vllm.entrypoints.openai.api_server --trust-remote-code --served-model-name gpt-4 --model CohereForAI/c4ai-command-r-v01 --gpu-memory-utilization 0.98 --tensor-parallel-size 4 --port 8000

3. 使用 cohere 的 command-r

在这里插入图片描述

完结!

相关推荐

  1. 使用vllm部署自己大模型

    2024-04-28 20:32:01       35 阅读
  2. WPF Command 使用

    2024-04-28 20:32:01       26 阅读
  3. Qwen等大模型使用 vLLM部署详解

    2024-04-28 20:32:01       24 阅读
  4. 使用vllIm部署大语言模型

    2024-04-28 20:32:01       27 阅读
  5. 大模型推理:vllm多机多卡分布式本地部署

    2024-04-28 20:32:01       52 阅读
  6. microk8s使用本地镜像部署服务

    2024-04-28 20:32:01       40 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 20:32:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 20:32:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 20:32:01       82 阅读
  4. Python语言-面向对象

    2024-04-28 20:32:01       91 阅读

热门阅读

  1. AI生成音乐

    2024-04-28 20:32:01       29 阅读
  2. 2024年通信安全员题库及答案

    2024-04-28 20:32:01       31 阅读
  3. 第一个爬虫:获取演员表

    2024-04-28 20:32:01       31 阅读
  4. 微信支付 + redis + 商品超卖问题

    2024-04-28 20:32:01       34 阅读
  5. 【算法基础】第五章:动态规划

    2024-04-28 20:32:01       27 阅读