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

Feat/ruxglm prompted dist #528

Merged
merged 60 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e4880ac
feat: ignore env secret ru
dilyararimovna Jul 12, 2023
4b2571d
feat: add access token
dilyararimovna Jul 12, 2023
08a19d8
feat: distribution ruxglm
dilyararimovna Jul 13, 2023
9ae3816
fix: ruxglm cards
dilyararimovna Jul 13, 2023
81f1b37
fix: use use_auth_token
dilyararimovna Jul 13, 2023
2b5f966
fix: eos tokens type
dilyararimovna Jul 13, 2023
7b51af3
fix: stats cpu ram
dilyararimovna Jul 13, 2023
8225761
fix: skills cards
dilyararimovna Jul 13, 2023
b5f0ed1
fix: components cards
dilyararimovna Jul 13, 2023
7774c24
fix: eos tokens
dilyararimovna Jul 13, 2023
dfad604
fix: eos tokens
dilyararimovna Jul 13, 2023
abe9205
fix: eos tokens
dilyararimovna Jul 13, 2023
a05df35
fix: eos tokens
dilyararimovna Jul 13, 2023
c3141d5
fix: cards and table
dilyararimovna Jul 13, 2023
be89f52
fix: ADDITIONAL_EOS_TOKENS
dilyararimovna Jul 13, 2023
6aba5f0
fix: ADDITIONAL_EOS_TOKENS
dilyararimovna Jul 13, 2023
56c5655
fix: codestyle
dilyararimovna Jul 13, 2023
81e31bc
fix: universal
dilyararimovna Jul 13, 2023
72a662e
fix: dream persona ru skill name
dilyararimovna Jul 14, 2023
f91909b
fix: prompt selector ru
dilyararimovna Jul 14, 2023
7a1b26b
fix: replacement
dilyararimovna Jul 14, 2023
74daf3a
fix: prompt selecrto
dilyararimovna Jul 14, 2023
c812602
fix: use params
dilyararimovna Jul 14, 2023
4127146
fix: timeout and history
dilyararimovna Jul 14, 2023
30b6b03
fix: trye very short persona
dilyararimovna Jul 14, 2023
b489540
fix: increase timeout
dilyararimovna Jul 14, 2023
1559d4a
fix: sub replacement tokens correctly
dilyararimovna Jul 14, 2023
6879d6b
fix: sub replacement tokens correctly
dilyararimovna Jul 14, 2023
300becb
fix: use stopping criteria
dilyararimovna Jul 14, 2023
5db14b5
fix: typing
dilyararimovna Jul 14, 2023
7e76588
fix: revert long persona
dilyararimovna Jul 14, 2023
8c6a4f2
fix: duplicate spaces
dilyararimovna Jul 14, 2023
4a5ece7
Merge branch 'dev' into feat/ruxglm_distribution
dilyararimovna Jul 14, 2023
2b62234
fix: correct components for russian distribution
dilyararimovna Jul 14, 2023
0978df2
fix: proxy for russian distribution
dilyararimovna Jul 14, 2023
5ea19a0
feat: universal distr for ru
dilyararimovna Jul 17, 2023
319de75
Merge branch 'dev' into feat/ruxglm_distribution
dilyararimovna Jul 17, 2023
3a7f164
feat: universal distr for ru
dilyararimovna Jul 17, 2023
f92a034
fix: remove extra
dilyararimovna Jul 17, 2023
eac0d15
fix: working configs
dilyararimovna Jul 17, 2023
cf64a74
fix: configs
dilyararimovna Jul 17, 2023
cbf2835
Merge branch 'feat/ruxglm_distribution' of https://github.com/deeppav…
dilyararimovna Jul 17, 2023
bde243d
feat: ruxglm prompted dists
dilyararimovna Jul 18, 2023
ac92a05
fix: component cards
dilyararimovna Jul 18, 2023
9f9254c
fix: container name
dilyararimovna Jul 18, 2023
150943e
Merge branch 'dev' into feat/ruxglm_prompted_dist
dilyararimovna Jul 20, 2023
0e9def2
fix: remove extra space after new line
dilyararimovna Jul 20, 2023
890c333
fix: remove extra space after new line
dilyararimovna Jul 20, 2023
393c583
feat: tests for dream ruxglm
dilyararimovna Jul 20, 2023
3c3685f
fix: proxy and ru lang
dilyararimovna Jul 20, 2023
70eb3fd
fix: change port of universal ru
dilyararimovna Jul 20, 2023
b5fa27c
fix: rights on file
dilyararimovna Jul 20, 2023
af5b8c6
fix: tests skills
dilyararimovna Jul 20, 2023
6d34994
fix: test for resp selector
dilyararimovna Jul 20, 2023
0c68f86
fix: tests for proxied components
dilyararimovna Jul 20, 2023
5ae0ee2
fix: remove do sample true
dilyararimovna Jul 21, 2023
af46ce7
fix: generative params
dilyararimovna Jul 24, 2023
d927f62
Merge branch 'dev' into feat/ruxglm_prompted_dist
dilyararimovna Jul 27, 2023
bb59db5
feat: used sentence ranker url
dilyararimovna Jul 27, 2023
43d8252
feat: utilized default llm
dilyararimovna Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,98 @@ pipeline {
}
}
}
// ------------------------------------------- Test prompted dists------------------------------------------------
stage('Build-DRUXGLM') {
steps {
script{
startTime = currentBuild.duration
Exception ex = null
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
try {
sh '''
cat /home/ignatov/secrets.txt >> .env_secret
tests/runtests_dream_ruxglm.sh MODE=build
'''
}
catch (Exception e) {
int duration = (currentBuild.duration - startTime) / 1000
throw e
}
}
}
}
post {
aborted {
script {
sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
}
}
success {
script {
int duration = (currentBuild.duration - startTime) / 1000
}
}
}
}
stage('Start-DRUXGLM') {
steps {
script {
startTime = currentBuild.duration
Exception ex = null
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
try {
sh 'tests/runtests_dream_ruxglm.sh MODE=clean && tests/runtests_dream_ruxglm.sh MODE=start'
}
catch (Exception e) {
int duration = (currentBuild.duration - startTime) / 1000
throw e
}
}
}
}
post {
success {
script {
started = true
int duration = (currentBuild.duration - startTime) / 1000
}
}
aborted {
script {
sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
}
}
}
}
stage('Test skills-DRUXGLM') {
steps {
script {
startTime = currentBuild.duration
Exception ex = null
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
try {
sh label: 'test skills', script: 'tests/runtests_dream_ruxglm.sh MODE=test_skills'
}
catch (Exception e) {
int duration = (currentBuild.duration - startTime) / 1000
throw e
}
}
}
}
post {
success {
script {
int duration = (currentBuild.duration - startTime) / 1000
}
}
aborted {
script {
sh 'tests/runtests_dream_ruxglm.sh MODE=clean'
}
}
}
}
// ------------------------------------------- Test prompted dists------------------------------------------------
stage('Build-Reason') {
steps {
Expand All @@ -43,6 +135,7 @@ pipeline {
try {
sh '''
cat /home/ignatov/secrets.txt >> .env_secret
tests/runtests_dream_ruxglm.sh MODE=clean
tests/runtests_reasoning.sh MODE=build
'''
}
Expand Down
29 changes: 15 additions & 14 deletions MODELS.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions assistant_dists/dream_persona_rullama_prompted/proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:

dialogrpt-ru:
command: [ "nginx", "-g", "daemon off;" ]
build:
context: dp/proxy/
dockerfile: Dockerfile
environment:
- PROXY_PASS=proxy.deeppavlov.ai:8122
- PORT=8122

version: "3.7"
9 changes: 9 additions & 0 deletions assistant_dists/dream_persona_ruxglm_prompted/cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.7'
services:
dialogrpt-ru:
environment:
CUDA_VISIBLE_DEVICES: ""
transformers-lm-ruxglm:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
6 changes: 6 additions & 0 deletions assistant_dists/dream_persona_ruxglm_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
}
40 changes: 40 additions & 0 deletions assistant_dists/dream_persona_ruxglm_prompted/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# С такими volumes удобно дебажить, не нужно пересобирать контейнер каждый раз при изменении кода
services:
agent:
volumes:
- ".:/dp-agent"
ports:
- 4242:4242
ranking-based-response-selector-ru:
volumes:
- "./response_selectors/ranking_based_response_selector:/src"
- "./common:/src/common"
ports:
- 8002:8002
dialogrpt-ru:
volumes:
- "./services/dialogrpt_ru:/src"
- "~/.deeppavlov/cache:/root/.cache"
ports:
- 8122:8122
prompt-selector-ru:
volumes:
- "./annotators/prompt_selector:/src"
- "./common:/src/common"
ports:
- 8135:8135
transformers-lm-ruxglm:
volumes:
- "./services/transformers_lm:/src"
- "./common:/src/common"
- "~/.deeppavlov/cache:/root/.cache"
ports:
- 8171:8171
dff-dream-persona-ruxglm-prompted-skill:
volumes:
- "./skills/dff_template_prompted_skill:/src"
- "./common:/src/common"
ports:
- 8172:8172

version: "3.7"
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
services:
agent:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/dream_persona_ruxglm_prompted/pipeline_conf.json'
environment:
WAIT_HOSTS: "ranking-based-response-selector-ru:8002,
dialogrpt-ru:8122, prompt-selector-ru:8135, transformers-lm-ruxglm:8171,
dff-dream-persona-ruxglm-prompted-skill:8172"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1800}
HIGH_PRIORITY_INTENTS: 0
RESTRICTION_FOR_SENSITIVE_CASE: 0
ALWAYS_TURN_ON_ALL_SKILLS: 0
LANGUAGE: RU
FALLBACK_FILE: fallbacks_dream_ru.json

ranking-based-response-selector-ru:
env_file: [ .env_ru ]
build:
args:
SERVICE_PORT: 8002
SERVICE_NAME: response_selector
SENTENCE_RANKER_ANNOTATION_NAME: dialogrpt
SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences
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

dialogrpt-ru:
env_file: [ .env_ru ]
build:
context: ./services/dialogrpt_ru/
args:
SERVICE_PORT: 8122
PRETRAINED_MODEL_FNAME: dialogrpt_ru_ckpt_v0.pth
TOKENIZER_NAME_OR_PATH: DeepPavlov/rudialogpt3_medium_based_on_gpt2_v2
command: flask run -h 0.0.0.0 -p 8122
environment:
- CUDA_VISIBLE_DEVICES=0
- FLASK_APP=server
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 4G

prompt-selector-ru:
env_file: [ .env_ru ]
build:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona_ru
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

transformers-lm-ruxglm:
env_file: [ .env_ru,.env_secret ]
build:
args:
SERVICE_PORT: 8171
SERVICE_NAME: transformers_lm_ruxglm
PRETRAINED_MODEL_NAME_OR_PATH: dim/xglm-4.5B_ru_v10_epoch_6_step_41141
HALF_PRECISION: 1
ADDITIONAL_EOS_TOKENS: <|endoftext|>,Human
context: .
dockerfile: ./services/transformers_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8171
environment:
- CUDA_VISIBLE_DEVICES=0
- FLASK_APP=server
deploy:
resources:
limits:
memory: 60G
reservations:
memory: 60G

dff-dream-persona-ruxglm-prompted-skill:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8172
SERVICE_NAME: dff_dream_persona_ru_prompted_skill
PROMPT_FILE: common/prompts/dream_persona_ru.json
GENERATIVE_SERVICE_URL: http://transformers-lm-ruxglm:8171/respond
GENERATIVE_SERVICE_CONFIG: ruxglm_config.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 3
context: .
dockerfile: ./skills/dff_template_prompted_skill/Dockerfile
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 128M

version: '3.7'
Loading
Loading