Skip to content

Commit

Permalink
fix: set/deploy a default embedder for kubeagi
Browse files Browse the repository at this point in the history
Signed-off-by: bjwswang <[email protected]>
  • Loading branch information
bjwswang committed Mar 18, 2024
1 parent aedee1e commit 1bcb3ec
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/samples/arcadia_v1alpha1_worker_baichuan2-7b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
image: kubeagi/minio-mc:RELEASE.2023-01-28T20-29-38Z
imagePullPolicy: IfNotPresent
runner:
image: kubeagi/arcadia-fastchat-worker:v0.2.0
image: kubeagi/arcadia-fastchat-worker:v0.2.36
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
image: kubeagi/minio-mc:RELEASE.2023-01-28T20-29-38Z
imagePullPolicy: IfNotPresent
runner:
image: kubeagi/arcadia-fastchat-worker:v0.2.0
image: kubeagi/arcadia-fastchat-worker:v0.2.36
imagePullPolicy: IfNotPresent
model:
kind: "Models"
Expand Down
2 changes: 1 addition & 1 deletion config/samples/arcadia_v1alpha1_worker_qwen-7b-chat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
image: kubeagi/minio-mc:RELEASE.2023-01-28T20-29-38Z
imagePullPolicy: IfNotPresent
runner:
image: kubeagi/arcadia-fastchat-worker:v0.2.0
image: kubeagi/arcadia-fastchat-worker:v0.2.36
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/arcadia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: arcadia
description: A Helm chart(Also a KubeBB Component) for KubeAGI Arcadia
type: application
version: 0.3.19
version: 0.3.20
appVersion: "0.2.0"

keywords:
Expand Down
1 change: 0 additions & 1 deletion deploy/charts/arcadia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ global settings of arcadia chart.

| Parameter | Description | Default |
| ------------------------ | ------------------------------------------------------------ | ----------- |
| `oss.bucket` | Name of the bucket where data is stored | `"arcadia"` |
| `defaultVectorStoreType` | Defines the default vector database type, currently `chroma` and `pgvector` are available | `pgvector` |

### controller
Expand Down
11 changes: 9 additions & 2 deletions deploy/charts/arcadia/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@ data:
name: '{{ .Release.Name }}-pgvector-vectorstore'
{{- end }}
namespace: '{{ .Release.Namespace }}'
{{- if .Values.rerank.enabled }}
{{- if .Values.config.embedder.enabled }}
embedder:
apiGroup: arcadia.kubeagi.k8s.com.cn/v1alpha1
kind: Embedder
name: {{ .Release.Name }}-embedder
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.config.rerank.enabled }}
rerank:
apiGroup: arcadia.kubeagi.k8s.com.cn/v1alpha1
kind: Model
name: bge-reranker-large
name: {{ .Values.config.rerank.model }}
namespace: {{ .Release.Namespace }}
{{- end }}

Expand Down
19 changes: 19 additions & 0 deletions deploy/charts/arcadia/templates/post-embedder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.config.embedder.enabled }}
apiVersion: arcadia.kubeagi.k8s.com.cn/v1alpha1
kind: Worker
metadata:
name: {{ .Release.Name }}-embedder
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "2"
spec:
displayName: 系统默认的Embedding模型服务
description: "这是系统默认使用的Embedding模型服务"
type: "fastchat"
replicas: 1
model:
kind: "Models"
name: {{ .Values.config.embedder.model }}
namespace: {{ .Release.Namespace }}
{{- end }}
21 changes: 14 additions & 7 deletions deploy/charts/arcadia/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
global:
oss:
bucket: &default-oss-bucket "arcadia"
## @param global.defaultVectorStoreType Defines the default vector database type, currently `chroma` and `pgvector` are available
## When the option is `chroma`, it needs `chromadb.enabled` to be `true` as well to work.
## When the option is `pgvector`, it needs `postgresql.enabled` to be `true` as well to work.
Expand All @@ -20,6 +18,18 @@ global:
- postgresql.<replaced-ingress-nginx-ip>.nip.io
ip: <replaced-ingress-nginx-ip>

# @section config is used to update configurations for this platform
config:
# embedder model by default
embedder:
enabled: false
model: "bge-large-zh-v1.5"
# reranking model by default
rerank:
enabled: true
model: "bge-reranker-large"


# @section controller is used as the core controller for arcadia
# @param image Image to be used
# @param imagePullPolcy ImagePullPolicy
Expand Down Expand Up @@ -115,7 +125,7 @@ minio:
- minio-console.<replaced-ingress-nginx-ip>.nip.io
buckets:
# Name of the bucket
- name: *default-oss-bucket
- name: "arcadia"
# Policy to be set on the
# bucket [none|download|upload|public|custom]
# if set to custom, customPolicy must be set.
Expand Down Expand Up @@ -188,7 +198,4 @@ ray:
- name: 3090-2-GPUs
headAddress: raycluster-kuberay-head-svc.kuberay-system.svc:6379
pythonVersion: 3.9.18
dashboardHost: raycluster-kuberay-head-svc.kuberay-system.svc:8265

rerank:
enabled: true
dashboardHost: raycluster-kuberay-head-svc.kuberay-system.svc:8265

0 comments on commit 1bcb3ec

Please sign in to comment.