Skip to content

Commit e4940bc

Browse files
authored
Fix model JSON ; Prettier format (#27)
1 parent bc49f2f commit e4940bc

File tree

11 files changed

+155
-66
lines changed

11 files changed

+155
-66
lines changed

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ OWL_PORT=6969
2323
OWL_WORKERS=3
2424
DOCIO_WORKERS=1
2525
DOCIO_DEVICE=cpu
26-
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
27-
RERANKER_MODEL=cross-encoder/ms-marco-TinyBERT-L-2
26+
EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
27+
RERANKER_MODEL=mixedbread-ai/mxbai-rerank-xsmall-v1
2828
OWL_CONCURRENT_ROWS_BATCH_SIZE=5
2929
OWL_CONCURRENT_COLS_BATCH_SIZE=5
30-
OWL_MAX_WRITE_BATCH_SIZE=1000
30+
OWL_MAX_WRITE_BATCH_SIZE=1000

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ jobs:
7878
# Replace the org with the key in the .env file
7979
sed -i "s/$org=.*/$org=$key/g" .env
8080
done
81+
sed -i "s:EMBEDDING_MODEL=.*:EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2:g" .env
82+
sed -i "s:RERANKER_MODEL=.*:RERANKER_MODEL=cross-encoder/ms-marco-TinyBERT-L-2:g" .env
83+
echo 'OWL_MODELS_CONFIG=models_ci.json' >> .env
8184
env:
8285
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
8386
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -91,7 +94,6 @@ jobs:
9194
run: |
9295
set -e
9396
docker compose -p jamai -f docker/compose.cpu.yml --profile minio up --quiet-pull -d --wait
94-
9597
env:
9698
COMPOSE_DOCKER_CLI_BUILD: 1
9799
DOCKER_BUILDKIT: 1
@@ -118,6 +120,7 @@ jobs:
118120
119121
- name: Inspect owl logs if Python SDK tests failed
120122
if: failure() && steps.python_sdk_test_oss.outcome == 'failure'
123+
timeout-minutes: 1
121124
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log
122125

123126
- name: Upload Pytest Test Results
@@ -139,6 +142,7 @@ jobs:
139142
140143
- name: Inspect owl logs if TS/JS SDK tests failed
141144
if: failure() && steps.ts_sdk_test_oss.outcome == 'failure'
145+
timeout-minutes: 1
142146
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log
143147

144148
- name: Update owl service for S3 test
@@ -168,6 +172,7 @@ jobs:
168172
169173
- name: Inspect owl logs if Python SDK tests failed
170174
if: failure() && steps.python_sdk_test_oss_file.outcome == 'failure'
175+
timeout-minutes: 1
171176
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log
172177

173178
lance_tests:

docker/amd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
[
66
"/bin/sh",
77
"-c",
8-
"(. /app/.venv/bin/activate && HIP_VISIBLE_DEVICES=0 infinity_emb v2 --port 6909 --model-id $${EMBEDDING_MODEL} --model-warmup --device cuda --engine torch --no-bettertransformer --no-compile &);(. /app/.venv/bin/activate && HIP_VISIBLE_DEVICES=1 infinity_emb v2 --port 6919 --model-id $${RERANKER_MODEL} --model-warmup --device cuda --engine torch --no-bettertransformer --no-compile)",
8+
". /app/.venv/bin/activate && HIP_VISIBLE_DEVICES=0 infinity_emb v2 --port 6909 --model-id $${EMBEDDING_MODEL} --model-id $${RERANKER_MODEL} --model-warmup --device cuda --engine torch --no-bettertransformer --no-compile",
99
]
1010
# # https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/docker.html
1111
# # instruction to specify the AMD GPU resources

docker/compose.cpu.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@ services:
22
infinity:
33
image: michaelf34/infinity:0.0.70-cpu
44
container_name: jamai_infinity
5-
command: [
6-
"v2",
7-
"--engine", "torch",
8-
"--port", "6909",
9-
"--model-warmup",
10-
"--model-id", "${EMBEDDING_MODEL}",
11-
"--model-id", "${RERANKER_MODEL}",
12-
]
5+
command: ["v2", "--engine", "torch", "--port", "6909", "--model-warmup", "--model-id", "${EMBEDDING_MODEL}", "--model-id", "${RERANKER_MODEL}"]
136
healthcheck:
147
test: ["CMD-SHELL", "curl --fail http://localhost:6909/health"]
158
interval: 10s

docker/compose.nvidia.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include:
22
- path:
33
- compose.cpu.yml
4-
- nvidia.yml
4+
- nvidia.yml

docker/nvidia.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
infinity:
3-
image: michaelf34/infinity:0.0.70 # Use GPU-compatible image, instead of torch cpu-only.
3+
image: michaelf34/infinity:0.0.70 # Use GPU-compatible image, instead of torch cpu-only.
44
deploy:
55
resources:
66
reservations:

services/api/src/owl/configs/models.json

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,9 @@
4444
}
4545
],
4646
"embed_models": [
47-
{
48-
"id": "ellm/sentence-transformers/all-MiniLM-L6-v2",
49-
"name": "ELLM MiniLM L6 v2",
50-
"context_length": 512,
51-
"embedding_size": 384,
52-
"languages": ["mul"],
53-
"capabilities": ["embed"],
54-
"deployments": [
55-
{
56-
"litellm_id": "openai/sentence-transformers/all-MiniLM-L6-v2",
57-
"api_base": "http://infinity:6909",
58-
"provider": "ellm"
59-
}
60-
]
61-
},
6247
{
6348
"id": "ellm/BAAI/bge-small-en-v1.5",
64-
"litellm_id": "openai/BAAI/bge-small-en-v1.5",
49+
"name": "ELLM BAAI BGE Small EN v1.5",
6550
"context_length": 512,
6651
"embedding_size": 1024,
6752
"languages": ["mul"],
@@ -140,28 +125,14 @@
140125
"rerank_models": [
141126
{
142127
"id": "ellm/mixedbread-ai/mxbai-rerank-xsmall-v1",
143-
"name": "ELLM mxbai-rerank-xsmall v1",
128+
"name": "ELLM MxBAI Rerank XSmall v1",
144129
"context_length": 512,
145130
"languages": ["en"],
146131
"capabilities": ["rerank"],
147132
"deployments": [
148133
{
149134
"litellm_id": "",
150-
"api_base": "http://infinity:6919",
151-
"provider": "ellm"
152-
}
153-
]
154-
},
155-
{
156-
"id": "ellm/cross-encoder/ms-marco-TinyBERT-L-2",
157-
"name": "ELLM TinyBERT L2",
158-
"context_length": 512,
159-
"languages": ["en"],
160-
"capabilities": ["rerank"],
161-
"deployments": [
162-
{
163-
"litellm_id": "",
164-
"api_base": "http://infinity:6919",
135+
"api_base": "http://infinity:6909",
165136
"provider": "ellm"
166137
}
167138
]
@@ -181,4 +152,4 @@
181152
]
182153
}
183154
]
184-
}
155+
}

services/api/src/owl/configs/models_aipc.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@
129129
],
130130
"embed_models": [
131131
{
132-
"id": "ellm/sentence-transformers/all-MiniLM-L6-v2",
133-
"name": "ELLM MiniLM L6 v2",
132+
"id": "ellm/BAAI/bge-small-en-v1.5",
133+
"name": "ELLM BAAI BGE Small EN v1.5",
134134
"context_length": 512,
135-
"embedding_size": 384,
135+
"embedding_size": 1024,
136136
"languages": ["mul"],
137137
"capabilities": ["embed"],
138138
"deployments": [
139139
{
140-
"litellm_id": "openai/sentence-transformers/all-MiniLM-L6-v2",
140+
"litellm_id": "openai/BAAI/bge-small-en-v1.5",
141141
"api_base": "http://infinity:6909",
142142
"provider": "ellm"
143143
}
@@ -209,15 +209,15 @@
209209
],
210210
"rerank_models": [
211211
{
212-
"id": "ellm/cross-encoder/ms-marco-TinyBERT-L-2",
213-
"name": "ELLM TinyBERT L2",
212+
"id": "ellm/mixedbread-ai/mxbai-rerank-xsmall-v1",
213+
"name": "ELLM MxBAI Rerank XSmall v1",
214214
"context_length": 512,
215215
"languages": ["en"],
216216
"capabilities": ["rerank"],
217217
"deployments": [
218218
{
219219
"litellm_id": "",
220-
"api_base": "http://infinity:6919",
220+
"api_base": "http://infinity:6909",
221221
"provider": "ellm"
222222
}
223223
]
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"llm_models": [
3+
{
4+
"id": "openai/gpt-4o-mini",
5+
"name": "OpenAI GPT-4o Mini",
6+
"context_length": 128000,
7+
"languages": ["mul"],
8+
"capabilities": ["chat", "image"],
9+
"deployments": [
10+
{
11+
"litellm_id": "",
12+
"api_base": "",
13+
"provider": "openai"
14+
}
15+
]
16+
},
17+
{
18+
"id": "anthropic/claude-3-haiku-20240307",
19+
"name": "Anthropic Claude 3 Haiku",
20+
"context_length": 200000,
21+
"languages": ["mul"],
22+
"capabilities": ["chat"],
23+
"deployments": [
24+
{
25+
"litellm_id": "",
26+
"api_base": "",
27+
"provider": "anthropic"
28+
}
29+
]
30+
},
31+
{
32+
"id": "together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
33+
"name": "Together AI Meta Llama 3.1 (8B)",
34+
"context_length": 130000,
35+
"languages": ["mul"],
36+
"capabilities": ["chat"],
37+
"deployments": [
38+
{
39+
"litellm_id": "",
40+
"api_base": "",
41+
"provider": "together_ai"
42+
}
43+
]
44+
}
45+
],
46+
"embed_models": [
47+
{
48+
"id": "ellm/sentence-transformers/all-MiniLM-L6-v2",
49+
"name": "ELLM MiniLM L6 v2",
50+
"context_length": 512,
51+
"embedding_size": 384,
52+
"languages": ["mul"],
53+
"capabilities": ["embed"],
54+
"deployments": [
55+
{
56+
"litellm_id": "openai/sentence-transformers/all-MiniLM-L6-v2",
57+
"api_base": "http://infinity:6909",
58+
"provider": "ellm"
59+
}
60+
]
61+
},
62+
{
63+
"id": "openai/text-embedding-3-small-512",
64+
"name": "OpenAI Text Embedding 3 Small (512-dim)",
65+
"context_length": 8192,
66+
"embedding_size": 512,
67+
"dimensions": 512,
68+
"languages": ["mul"],
69+
"capabilities": ["embed"],
70+
"deployments": [
71+
{
72+
"litellm_id": "text-embedding-3-small",
73+
"api_base": "",
74+
"provider": "openai"
75+
}
76+
]
77+
},
78+
{
79+
"id": "cohere/embed-multilingual-v3.0",
80+
"name": "Cohere Embed Multilingual v3.0",
81+
"context_length": 512,
82+
"embedding_size": 1024,
83+
"languages": ["mul"],
84+
"capabilities": ["embed"],
85+
"deployments": [
86+
{
87+
"litellm_id": "embed-multilingual-v3.0",
88+
"api_base": "",
89+
"provider": "cohere"
90+
}
91+
]
92+
}
93+
],
94+
"rerank_models": [
95+
{
96+
"id": "ellm/cross-encoder/ms-marco-TinyBERT-L-2",
97+
"name": "ELLM TinyBERT L2",
98+
"context_length": 512,
99+
"languages": ["en"],
100+
"capabilities": ["rerank"],
101+
"deployments": [
102+
{
103+
"litellm_id": "",
104+
"api_base": "http://infinity:6909",
105+
"provider": "ellm"
106+
}
107+
]
108+
},
109+
{
110+
"id": "cohere/rerank-multilingual-v3.0",
111+
"name": "Cohere Rerank Multilingual v3.0",
112+
"context_length": 512,
113+
"languages": ["mul"],
114+
"capabilities": ["rerank"],
115+
"deployments": [
116+
{
117+
"litellm_id": "",
118+
"api_base": "",
119+
"provider": "cohere"
120+
}
121+
]
122+
}
123+
]
124+
}

services/api/src/owl/configs/models_ollama.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
],
6060
"embed_models": [
6161
{
62-
"id": "ellm/sentence-transformers/all-MiniLM-L6-v2",
63-
"name": "ELLM MiniLM L6 v2",
62+
"id": "ellm/BAAI/bge-small-en-v1.5",
63+
"name": "ELLM BAAI BGE Small EN v1.5",
6464
"context_length": 512,
65-
"embedding_size": 384,
65+
"embedding_size": 1024,
6666
"languages": ["mul"],
6767
"capabilities": ["embed"],
6868
"deployments": [
6969
{
70-
"litellm_id": "openai/sentence-transformers/all-MiniLM-L6-v2",
70+
"litellm_id": "openai/BAAI/bge-small-en-v1.5",
7171
"api_base": "http://infinity:6909",
7272
"provider": "ellm"
7373
}
@@ -139,15 +139,15 @@
139139
],
140140
"rerank_models": [
141141
{
142-
"id": "ellm/cross-encoder/ms-marco-TinyBERT-L-2",
143-
"name": "ELLM TinyBERT L2",
142+
"id": "ellm/mixedbread-ai/mxbai-rerank-xsmall-v1",
143+
"name": "ELLM MxBAI Rerank XSmall v1",
144144
"context_length": 512,
145145
"languages": ["en"],
146146
"capabilities": ["rerank"],
147147
"deployments": [
148148
{
149149
"litellm_id": "",
150-
"api_base": "http://infinity:6919",
150+
"api_base": "http://infinity:6909",
151151
"provider": "ellm"
152152
}
153153
]

services/app/electron/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ app.whenReady().then(() => {
6868
// cmd: [path.resolve('resources/infinity_server/infinity_server.exe'), 'v1', '--host', '127.0.0.1', '--port', '6909', '--model-warmup', '--device', 'cpu', '--model-name-or-path', 'sentence-transformers/all-MiniLM-L6-v2'],
6969
// cwd: path.resolve('resources/infinity_server'),
7070
// },
71-
// reranker: {
72-
// cmd: [path.resolve('resources/infinity_server/infinity_server.exe'), 'v1', '--host', '127.0.0.1', '--port', '6919', '--model-warmup', '--device', 'cpu', '--model-name-or-path', 'cross-encoder/ms-marco-TinyBERT-L-2'],
73-
// cwd: path.resolve('resources/infinity_server'),
74-
// },
7571
// ellm_api_server: {
7672
// cmd: [path.resolve('resources/ellm_api_server/ellm_api_server.exe'), '--model_path', path.resolve('resources/phi3-mini-directml-int4-awq-block-128'), '--port', '5555'],
7773
// cwd: path.resolve('resources'),

0 commit comments

Comments
 (0)