Skip to content

Commit

Permalink
Feat/prompted robot (#550)
Browse files Browse the repository at this point in the history
* robot first commit (no cards)

* feat: do not use sentence ranker url from env (#535)

* Feat/ruxglm prompted dist (#528)

* feat: ignore env secret ru

* feat: add access token

* feat: distribution ruxglm

* fix: ruxglm cards

* fix: use use_auth_token

* fix: eos tokens type

* fix: stats cpu ram

* fix: skills cards

* fix: components cards

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: cards and table

* fix: ADDITIONAL_EOS_TOKENS

* fix: ADDITIONAL_EOS_TOKENS

* fix: codestyle

* fix: universal

* fix: dream persona ru skill name

* fix: prompt selector ru

* fix: replacement

* fix: prompt selecrto

* fix: use params

* fix: timeout and history

* fix: trye very short persona

* fix: increase timeout

* fix: sub replacement tokens correctly

* fix: sub replacement tokens correctly

* fix: use stopping criteria

* fix: typing

* fix: revert long persona

* fix: duplicate spaces

* fix: correct components for russian distribution

* fix: proxy for russian distribution

* feat: universal distr for ru

* feat: universal distr for ru

* fix: remove extra

* fix: working configs

* fix: configs

* feat: ruxglm prompted dists

* fix: component cards

* fix: container name

* fix: remove extra space after new line

* fix: remove extra space after new line

* feat: tests for dream ruxglm

* fix: proxy and ru lang

* fix: change port of universal ru

* fix: rights on file

* fix: tests skills

* fix: test for resp selector

* fix: tests for proxied components

* fix: remove do sample true

* fix: generative params

* feat: used sentence ranker url

* feat: utilized default llm

* Feat/ru prompted dists (#532)

* feat: ignore env secret ru

* feat: add access token

* feat: distribution ruxglm

* fix: ruxglm cards

* fix: use use_auth_token

* fix: eos tokens type

* fix: stats cpu ram

* fix: skills cards

* fix: components cards

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: cards and table

* fix: ADDITIONAL_EOS_TOKENS

* fix: ADDITIONAL_EOS_TOKENS

* fix: codestyle

* fix: universal

* fix: dream persona ru skill name

* fix: prompt selector ru

* fix: replacement

* fix: prompt selecrto

* fix: use params

* fix: timeout and history

* fix: trye very short persona

* fix: increase timeout

* fix: sub replacement tokens correctly

* fix: sub replacement tokens correctly

* fix: use stopping criteria

* fix: typing

* fix: revert long persona

* fix: duplicate spaces

* fix: correct components for russian distribution

* fix: proxy for russian distribution

* feat: universal distr for ru

* feat: universal distr for ru

* fix: remove extra

* fix: working configs

* fix: configs

* feat: ruxglm prompted dists

* fix: component cards

* fix: container name

* first dist (no cards)

* fix: remove extra space after new line

* fix: remove extra space after new line

* feat: tests for dream ruxglm

* fix: proxy and ru lang

* fix: change port of universal ru

* fix: rights on file

* fix: tests skills

* fix: test for resp selector

* multiskill_ru_assistant

* fix: tests for proxied components

* fairytale and action stories dists

* journalist helper dist

* fairytale fixes

* one more fix

* action stories cards

* add quotation marks

* fairytale cards

* storyteller cards

* journalist helper cards

* multiskill ru cards

* agent services cards

* minor fixes

* fix: utilize sentence ranker url

---------

Co-authored-by: dilyararimovna <[email protected]>

* update components.tsv (#537)

* update components.tsv

* tabulation

* Feat/rugpt 3.5 distribution (#534)

* feat: ignore env secret ru

* feat: add access token

* feat: distribution ruxglm

* fix: ruxglm cards

* fix: use use_auth_token

* fix: eos tokens type

* fix: stats cpu ram

* fix: skills cards

* fix: components cards

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: eos tokens

* fix: cards and table

* fix: ADDITIONAL_EOS_TOKENS

* fix: ADDITIONAL_EOS_TOKENS

* fix: codestyle

* fix: universal

* fix: dream persona ru skill name

* fix: prompt selector ru

* fix: replacement

* fix: prompt selecrto

* fix: use params

* fix: timeout and history

* fix: trye very short persona

* fix: increase timeout

* fix: sub replacement tokens correctly

* fix: sub replacement tokens correctly

* fix: use stopping criteria

* fix: typing

* fix: revert long persona

* fix: duplicate spaces

* fix: correct components for russian distribution

* fix: proxy for russian distribution

* feat: universal distr for ru

* feat: universal distr for ru

* fix: remove extra

* fix: working configs

* fix: configs

* feat: ruxglm prompted dists

* fix: component cards

* fix: container name

* fix: remove extra space after new line

* fix: remove extra space after new line

* feat: tests for dream ruxglm

* fix: proxy and ru lang

* fix: change port of universal ru

* fix: rights on file

* fix: tests skills

* fix: test for resp selector

* fix: tests for proxied components

* feat: rugpt-3.5 by sber in universal russian distribution

* fix; wait for it

* fix: models card

* fix: models card

* fix: add to list

* fix: change port

* fix: change port

* fix: change size to correct

* feat: instruction how to add a new model

* fix ru prompt selector, remove unused component (#538)

* feat: replace oasst12b with gptjt (#541)

* Feat/utilize rugpt35 (#540)

* feat: utilize rugpt35

* feat: tests for jounrlist rugpt35

* feat: tests for jounrlist rugpt35

* fix: rights for tfile

* feat: names

* fix: ru_dists_names_and_prompts (#543)

* rename ruxglm to u

* more renaming

* tabs

* tabs

* some more renaming

* short prompt

* many cards and name changes

* fix typo

* fixes for Dilya

* tiny fix

* tiny fix

* huge name check

* names

* typo prompt

* fix: no tests for non existing skills

---------

Co-authored-by: dilyararimovna <[email protected]>

* fix: cards for ru dists (#544)

* fix: rugpt35 config and envs (#546)

* Summarization models (#393)

* Added abstractive summarization model for English texts

* Added abstractive summarization model for Russian texts

* Added summarization annotator

* Moved rut5 summarizer to dream_russian

* Changed endpoint

* Added model path to Dockerfile

* Updated test

* Updated summarization annotator input

* Updated test

* Changed summarization service url

* Changed test

* Increased timeout

* Updated ram_usage

* Updated ports

* Updated models cards

* Added more info messages

* Fixed path error

* Added summarization output to bot attributes

* Added timeout param to dockerfile

* Updated model cards and ports

* Fixed problem with incorrect batch processing

* Updated summarization save format

* Updated dialog summarization model

* Updated tests

* Minor formatting changes

* Fixed black and flake8 codestyle

* Fixed black codestyle

* Updated models ports

* Small fixes

* Models table upd (#539)

* Fix requirements.txt (#84)

* fix itsdangerous requirements

* pin itsdangerous requirements for all flask==1.1.1 servers

* updated MODELS.md table: added info about models' licensing and commercial use + merged link+name cols to improve overall readability and decrease redundancy

* Update MODELS.md

fixed "is" for better consistency

* fix: format table and add new models back

* fix: sizes of models on gpu

* updated table

---------

Co-authored-by: Andrii.Hura <[email protected]>
Co-authored-by: mtalimanchuk <[email protected]>
Co-authored-by: Dilyara Baymurzina <[email protected]>

* fix: anthropic model params (#547)

* fix summarization annotator card (#549)

* add cards for prompted robot

* ports and n_utt

* port

* increase WAIT_HOSTS_TIMEOUT in cards

---------

Co-authored-by: Dilyara Zharikova (Baymurzina) <[email protected]>
Co-authored-by: Maxim Talimanchuk <[email protected]>
Co-authored-by: Nikolay <[email protected]>
Co-authored-by: Anastásis <[email protected]>
Co-authored-by: Andrii.Hura <[email protected]>
  • Loading branch information
6 people authored Aug 9, 2023
1 parent 2733f4a commit f99a312
Show file tree
Hide file tree
Showing 14 changed files with 635 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assistant_dists/dream_robot_prompted/cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3.7'
services:
combined-classification:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
sentence-ranker:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
6 changes: 6 additions & 0 deletions assistant_dists/dream_robot_prompted/db_conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"host": "DB_HOST",
"port": "DB_PORT",
"name": "DB_NAME",
"env": true
}
50 changes: 50 additions & 0 deletions assistant_dists/dream_robot_prompted/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# С такими volumes удобно дебажить, не нужно пересобирать контейнер каждый раз при изменении кода
services:
agent:
volumes:
- ".:/dp-agent"
ports:
- 4242:4242
sentseg:
volumes:
- "./annotators/SentSeg:/src"
ports:
- 8011:8011
ranking-based-response-selector:
volumes:
- "./response_selectors/ranking_based_response_selector:/src"
- "./common:/src/common"
ports:
- 8002:8002
combined-classification:
volumes:
- "./common:/src/common"
- "./annotators/combined_classification:/src"
ports:
- 8087:8087
sentence-ranker:
volumes:
- "./services/sentence_ranker:/src"
- "~/.deeppavlov/cache:/root/.cache"
ports:
- 8128:8128
prompt-selector:
volumes:
- "./annotators/prompt_selector:/src"
- "./common:/src/common"
ports:
- 8135:8135
openai-api-chatgpt:
volumes:
- "./services/openai_api_lm:/src"
- "./common:/src/common"
ports:
- 8145:8145
dff-robot-prompted-skill:
volumes:
- "./skills/dff_template_prompted_skill:/src"
- "./common:/src/common"
ports:
- 8179:8179

version: "3.7"
151 changes: 151 additions & 0 deletions assistant_dists/dream_robot_prompted/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
services:
agent:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/dream_robot_prompted/pipeline_conf.json'
environment:
WAIT_HOSTS: "sentseg:8011, ranking-based-response-selector:8002, combined-classification:8087,
sentence-ranker:8128, prompt-selector:8135, openai-api-chatgpt:8145,
dff-robot-prompted-skill:8179"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1000}
HIGH_PRIORITY_INTENTS: 1
RESTRICTION_FOR_SENSITIVE_CASE: 1
ALWAYS_TURN_ON_ALL_SKILLS: 0
LANGUAGE: EN
FALLBACK_FILE: fallbacks_dream_en.json

sentseg:
env_file: [ .env ]
build:
context: ./annotators/SentSeg/
command: flask run -h 0.0.0.0 -p 8011
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 1.5G
reservations:
memory: 1.5G

combined-classification:
env_file: [ .env ]
build:
args:
CONFIG: combined_classifier.json
SERVICE_PORT: 8087
context: .
dockerfile: ./annotators/combined_classification/Dockerfile
command: gunicorn --workers=1 server:app -b 0.0.0.0:8087 --timeout 600
environment:
- CUDA_VISIBLE_DEVICES=0
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 2G

ranking-based-response-selector:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8002
SERVICE_NAME: response_selector
LANGUAGE: EN
SENTENCE_RANKER_ANNOTATION_NAME: sentence_ranker
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
SENTENCE_RANKER_TIMEOUT: 3
N_UTTERANCES_CONTEXT: 5
FILTER_TOXIC_OR_BADLISTED: 1
context: .
dockerfile: ./response_selectors/ranking_based_response_selector/Dockerfile
command: flask run -h 0.0.0.0 -p 8002
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M

prompt-selector:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: robot
context: .
dockerfile: ./annotators/prompt_selector/Dockerfile
command: flask run -h 0.0.0.0 -p 8135
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M

sentence-ranker:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8128
SERVICE_NAME: sentence_ranker
PRETRAINED_MODEL_NAME_OR_PATH: sentence-transformers/all-MiniLM-L6-v2
context: ./services/sentence_ranker/
command: flask run -h 0.0.0.0 -p 8128
environment:
- CUDA_VISIBLE_DEVICES=0
- FLASK_APP=server
deploy:
resources:
limits:
memory: 3G
reservations:
memory: 3G

openai-api-chatgpt:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8145
SERVICE_NAME: openai_api_chatgpt
PRETRAINED_MODEL_NAME_OR_PATH: gpt-3.5-turbo
context: .
dockerfile: ./services/openai_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8145
environment:
- CUDA_VISIBLE_DEVICES=0
- FLASK_APP=server
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 100M

dff-robot-prompted-skill:
env_file: [ .env,.env_secret ]
build:
args:
SERVICE_PORT: 8179
SERVICE_NAME: dff_robot_prompted_skill
PROMPT_FILE: common/prompts/robot.json
GENERATIVE_SERVICE_URL: http://openai-api-chatgpt:8145/respond
GENERATIVE_SERVICE_CONFIG: openai-chatgpt.json
GENERATIVE_TIMEOUT: 120
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
dockerfile: ./skills/dff_template_prompted_skill/Dockerfile
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 128M

version: '3.7'
Loading

0 comments on commit f99a312

Please sign in to comment.