2 篇文章带有标签 “scaling”

FastChat 部署多模型


* [Chatbot Arena](https://chat.lmsys.org/) * [FastChat](https://github.com/lm-sys/FastChat) * [LMSYS BLOG](https://lmsys.org/blog/) * [Use AutoGen for Local LLMs](https://microsoft.github.io/autogen/blog/2023/07/14/Local-LLMs/)

安装

pip

pip install "fschat[model_worker,webui]"

源代码

这种方式安装比较容易调试,适合开发者。

克隆代码

git clone https://github.com/lm-sys/FastChat.git
cd FastChat

创建环境

python -m venv env
source env/bin/activate

安装

Kubernetes中的ReplicationController和ReplicaSet

ReplicationController

保证 Pod 对象始终处于期望的运行状态。不管 Pod 因何种原因消失(节点从集群消失或pod从节点中逐出)。

控制器的协调流程

LOOP

  1. 通过标签选择器匹配 Pod
  2. 比较匹配的数量与期望的副本数量
  • 少了。使用当前的模板创建 Pod
  • 多了。删除超出数量的 Pod
  • 等于。

ReplicationController 的三个主要部分

  • selector, 标签选择器
  • replicas, 副本个数
  • template, Pod 模板

编写 ReplicationController 的YAML文件(kubia-rc.yaml) apiVersion: v1 kind: ReplicationController metadata: name: kubia spec: selector: app: kubia replicas: 2 template: metadata: labels: app: kubia spec: containers: - name: kubia image: wangjunjian/kubia:latest ports: - containerPort: 8080 ★ 可以不指定标签选择器(selector),它会自动根据 Pod 模板中的标签设置。