Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new models #608

Merged
merged 5 commits into from Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -105,7 +105,7 @@ services:
SERVICE_NAME: dff_dream_persona_ru_prompted_skill
PROMPT_FILE: common/prompts/dream_persona_ru.json
GENERATIVE_SERVICE_URL: http://gigachat-api:8187/respond
GENERATIVE_SERVICE_CONFIG: ruxglm_config.json
GENERATIVE_SERVICE_CONFIG: gigachat.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 3
context: .
Expand Down
12 changes: 12 additions & 0 deletions assistant_dists/universal_prompted_assistant/dev.yml
Expand Up @@ -77,6 +77,18 @@ services:
- "./common:/src/common"
ports:
- 8187:8187
gigachat-pro-api:
volumes:
- "./services/gigachat_api_lm:/src"
- "./common:/src/common"
ports:
- 8188:8188
gigachat-plus-api:
volumes:
- "./services/gigachat_api_lm:/src"
- "./common:/src/common"
ports:
- 8189:8189
anthropic-api-claude-v1:
volumes:
- "./services/anthropic_api_lm:/src"
Expand Down
Expand Up @@ -6,7 +6,8 @@ services:
sentence-ranker:8128,
transformers-lm-gptjt:8161, openai-api-chatgpt:8145, openai-api-davinci3:8131,
openai-api-gpt4:8159, openai-api-gpt4-32k:8160, openai-api-chatgpt-16k:8167,
openai-api-gpt4-turbo:8180, gigachat-api:8187, dff-universal-prompted-skill:8147"
openai-api-gpt4-turbo:8180, gigachat-api:8187, gigachat-pro-api:8188, gigachat-plus-api:8189,
dff-universal-prompted-skill:8147"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1000}

sentseg:
Expand Down Expand Up @@ -225,7 +226,7 @@ services:
args:
SERVICE_PORT: 8187
SERVICE_NAME: gigachat_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat:1.3.23.1
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8187
Expand All @@ -238,6 +239,44 @@ services:
reservations:
memory: 100M

gigachat-pro-api:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8188
SERVICE_NAME: gigachat_pro_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Pro
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8188
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

gigachat-plus-api:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8189
SERVICE_NAME: gigachat_plus_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Plus
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8189
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

anthropic-api-claude-v1:
env_file: [ .env ]
build:
Expand Down
12 changes: 12 additions & 0 deletions assistant_dists/universal_ru_prompted_assistant/dev.yml
Expand Up @@ -73,6 +73,18 @@ services:
- "./common:/src/common"
ports:
- 8187:8187
gigachat-pro-api:
volumes:
- "./services/gigachat_api_lm:/src"
- "./common:/src/common"
ports:
- 8188:8188
gigachat-plus-api:
volumes:
- "./services/gigachat_api_lm:/src"
- "./common:/src/common"
ports:
- 8189:8189
dff-universal-ru-prompted-skill:
volumes:
- "./skills/dff_universal_prompted_skill:/src"
Expand Down
Expand Up @@ -6,7 +6,8 @@ services:
dialogrpt-ru:8122, transformers-lm-ruxglm:8171, transformers-lm-rugpt35:8178,
openai-api-chatgpt:8145, openai-api-davinci3:8131,
openai-api-gpt4:8159, openai-api-gpt4-32k:8160, openai-api-chatgpt-16k:8167,
openai-api-gpt4-turbo:8180, dff-universal-ru-prompted-skill:8161"
openai-api-gpt4-turbo:8180, gigachat-api:8187, gigachat-pro-api:8188, gigachat-plus-api:8189,
dff-universal-ru-prompted-skill:8161"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1800}
HIGH_PRIORITY_INTENTS: 0
RESTRICTION_FOR_SENSITIVE_CASE: 0
Expand Down Expand Up @@ -219,7 +220,7 @@ services:
args:
SERVICE_PORT: 8187
SERVICE_NAME: gigachat_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat:1.3.23.1
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8187
Expand All @@ -232,6 +233,44 @@ services:
reservations:
memory: 100M

gigachat-pro-api:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8188
SERVICE_NAME: gigachat_pro_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Pro
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8188
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

gigachat-plus-api:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8189
SERVICE_NAME: gigachat_plus_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Plus
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8189
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

dff-universal-ru-prompted-skill:
env_file: [ .env_ru ]
build:
Expand Down
7 changes: 7 additions & 0 deletions common/generative_configs/gigachat_plus.json
@@ -0,0 +1,7 @@
{
"max_tokens": 256,
"temperature": 0.4,
"top_p": 1.0,
"frequency_penalty": 0,
"presence_penalty": 0
}
4 changes: 2 additions & 2 deletions components.tsv
Expand Up @@ -191,6 +191,6 @@
8185 transformers-mistral-7b-128k
8186 dff-document-qa-transformers-llm-skill
8187 gigachat-api
8188
8189
8188 gigachat-pro-api
8189 gigachat-plus-api
8190
24 changes: 24 additions & 0 deletions components/0AJHsfha7fbhadfBsdfg.yml
@@ -0,0 +1,24 @@
name: gigachat-plus
display_name: GigaChat-Plus
component_type: Generative
model_type: NN-based
is_customizable: false
author: publisher@deeppavlov.ai
description: The model is suitable for tasks that require processing a large amount of data.
For example, summarizing articles or call transcriptions, extracting information from documents
ram_usage: 100M
gpu_usage: null
group: services
connector:
protocol: http
timeout: 120.0
url: http://gigachat-plus-api:8189/respond
dialog_formatter: null
response_formatter: null
previous_services: null
required_previous_services: null
state_manager_method: null
tags: null
endpoint: respond
service: services/gigachat_api_lm/service_configs/gigachat-plus-api
date_created: '2023-12-25T09:45:32'
2 changes: 1 addition & 1 deletion components/0bBDINLSJDnjn1pzf8sdA.yml
@@ -1,5 +1,5 @@
name: gigachat
display_name: GigaChat
display_name: GigaChat Lite
component_type: Generative
model_type: NN-based
is_customizable: false
Expand Down
24 changes: 24 additions & 0 deletions components/sdfvrt3r4Nsd4Kn43ksdfngn.yml
@@ -0,0 +1,24 @@
name: gigachat-pro
display_name: GigaChat-Pro
component_type: Generative
model_type: NN-based
is_customizable: false
author: publisher@deeppavlov.ai
description: GigaChat Pro is suitable for complex, highly specialized tasks,
as it follows instructions better and can perform more complex tasks.
ram_usage: 100M
gpu_usage: null
group: services
connector:
protocol: http
timeout: 120.0
url: http://gigachat-pro-api:8188/respond
dialog_formatter: null
response_formatter: null
previous_services: null
required_previous_services: null
state_manager_method: null
tags: null
endpoint: respond
service: services/gigachat_api_lm/service_configs/gigachat-pro-api
date_created: '2023-12-25T09:45:32'
4 changes: 3 additions & 1 deletion services/gigachat_api_lm/server.py
Expand Up @@ -24,7 +24,9 @@
app = Flask(__name__)
logging.getLogger("werkzeug").setLevel("WARNING")
DEFAULT_CONFIGS = {
"GigaChat:1.3.23.1": json.load(open("common/generative_configs/gigachat.json", "r")),
"GigaChat": json.load(open("common/generative_configs/gigachat.json", "r")),
"GigaChat-Pro": json.load(open("common/generative_configs/gigachat.json", "r")),
"GigaChat-Plus": json.load(open("common/generative_configs/gigachat_plus.json", "r")),
}


Expand Down
@@ -1,4 +1,4 @@
SERVICE_PORT: 8187
SERVICE_NAME: gigachat_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat:1.3.23.1
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat
FLASK_APP: server
Expand Up @@ -9,7 +9,7 @@ compose:
args:
SERVICE_PORT: 8187
SERVICE_NAME: gigachat_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat:1.3.23.1
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8187
Expand Down
@@ -0,0 +1,4 @@
SERVICE_PORT: 8189
SERVICE_NAME: gigachat_plus_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Plus
FLASK_APP: server
@@ -0,0 +1,29 @@
name: gigachat-plus-api
endpoints:
- respond
- generate_goals
compose:
env_file:
- .env
build:
args:
SERVICE_PORT: 8189
SERVICE_NAME: gigachat_plus_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Plus
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8189
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M
volumes:
- ./services/gigachat_api_lm:/src
- ./common:/src/common
ports:
- 8189:8189
proxy: null
@@ -0,0 +1,4 @@
SERVICE_PORT: 8188
SERVICE_NAME: gigachat_pro_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Pro
FLASK_APP: server
@@ -0,0 +1,29 @@
name: gigachat-pro-api
endpoints:
- respond
- generate_goals
compose:
env_file:
- .env
build:
args:
SERVICE_PORT: 8188
SERVICE_NAME: gigachat_pro_api
PRETRAINED_MODEL_NAME_OR_PATH: GigaChat-Pro
context: .
dockerfile: ./services/gigachat_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8188
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M
volumes:
- ./services/gigachat_api_lm:/src
- ./common:/src/common
ports:
- 8188:8188
proxy: null
2 changes: 2 additions & 0 deletions skills/dff_universal_prompted_skill/scenario/response.py
Expand Up @@ -42,6 +42,8 @@
"http://transformers-lm-ruxglm:8171/respond": [],
"http://transformers-lm-rugpt35:8178/respond": [],
"http://gigachat-api:8187/respond": ["GIGACHAT_CREDENTIAL", "GIGACHAT_SCOPE"],
"http://gigachat-pro-api:8188/respond": ["GIGACHAT_CREDENTIAL", "GIGACHAT_SCOPE"],
"http://gigachat-plus-api:8189/respond": ["GIGACHAT_CREDENTIAL", "GIGACHAT_SCOPE"],
}


Expand Down
4 changes: 1 addition & 3 deletions tests/runtests_dream_ruxglm.sh
Expand Up @@ -110,9 +110,7 @@ if [[ "$MODE" == "test_skills" || "$MODE" == "all" ]]; then
echo "Passing test data to each skill selected for testing"


for container in ranking-based-response-selector-ru prompt-selector-ru \
dff-dream-persona-ruxglm-prompted-skill; do

for container in ranking-based-response-selector-ru prompt-selector-ru; do
echo "Run tests for $container"
dockercompose_cmd exec -T -u $(id -u) $container ./test.sh
done
Expand Down
3 changes: 1 addition & 2 deletions tests/runtests_journalist_rugpt35.sh
Expand Up @@ -110,8 +110,7 @@ if [[ "$MODE" == "test_skills" || "$MODE" == "all" ]]; then
echo "Passing test data to each skill selected for testing"


for container in ranking-based-response-selector-ru prompt-selector-ru \
dff-journalist-helper-ru-prompted-skill; do
for container in ranking-based-response-selector-ru prompt-selector-ru; do

echo "Run tests for $container"
dockercompose_cmd exec -T -u $(id -u) $container ./test.sh
Expand Down
2 changes: 1 addition & 1 deletion tests/runtests_marketing_gptjt.sh
Expand Up @@ -110,7 +110,7 @@ if [[ "$MODE" == "test_skills" || "$MODE" == "all" ]]; then
echo "Passing test data to each skill selected for testing"


for container in ranking-based-response-selector prompt-selector dff-marketing-prompted-skill; do
for container in ranking-based-response-selector prompt-selector; do

echo "Run tests for $container"
dockercompose_cmd exec -T -u $(id -u) $container ./test.sh
Expand Down