Skip to content

Commit

Permalink
Merge pull request #501 from deeppavlov/dev
Browse files Browse the repository at this point in the history
Release v1.7.0
  • Loading branch information
dilyararimovna authored Jun 28, 2023
2 parents a0ff368 + e0bf64e commit 8c3f34d
Show file tree
Hide file tree
Showing 85 changed files with 3,462 additions and 231 deletions.
24 changes: 13 additions & 11 deletions MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

Here you may find a list of models that currently available for use in Generative Assistants.

| model name | container name | model link | open-source? | size (billion parameters) | GPU usage | max tokens (prompt + response) | description |
|---------------------------|--------------------------|-------------------------------------------------------------------------|--------------------------|---------------------------|---------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| BLOOMZ 7B | transformers-lm-bloomz7b | [link](https://huggingface.co/bigscience/bloomz-7b1) | yes | 7.1B | 33GB | 2,048 tokens | An open-source multilingual instruction-based large language model (46 languages). NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-J 6B | transformers-lm-gptj | [link](https://huggingface.co/EleutherAI/gpt-j-6b) | yes | 6B | 25GB | 2,048 tokens | An open-source English-only large language model which is NOT fine-tuned for instruction following and NOT capable of code generation. NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-3.5 | openai-api-davinci3 | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 4,097 tokens | A multulingual instruction-based large language model which is capable of code generation. Unlike ChatGPT, not optimised for chat. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| ChatGPT | openai-api-chatgpt | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 4,096 tokens | Based on gpt-3.5-turbo -- the most capable of the entire GPT-3/GPT-3.5 models family. Optimized for chat. Able to understand and generate code. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| Open-Assistant Pythia 12B | transformers-lm-oasst12b | [link](https://huggingface.co/OpenAssistant/pythia-12b-sft-v8-7k-steps) | yes | 12B | 26GB (half-precision) | 5,120 tokens | An open-source English-only instruction-based large language model which is NOT good at answering math and coding questions. NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-4 | openai-api-gpt4 | [link](https://platform.openai.com/docs/models/gpt-4) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 8,192 tokens | A multilingual instruction-based large language model which is capable of code generation and other complex tasks. More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| GPT-4 32K | openai-api-gpt4-32k | [link](https://platform.openai.com/docs/models/gpt-4) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 32,768 tokens | A multilingual instruction-based large language model which is capable of code generation and other complex tasks. Same capabilities as the base gpt-4 mode but with 4x the context length. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| GPT-JT 6B | transformers-lm-gptjt | [link](https://huggingface.co/togethercomputer/GPT-JT-6B-v1) | yes | 6B | 26GB | 2,048 tokens | An open-source English-only large language model which was fine-tuned for instruction following but is NOT capable of code generation. NB: free of charge. This model is up and running on our servers and can be used for free. |
| ChatGPT 16k | openai-api-chatgpt-16k | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 16,384 tokens | Same capabilities as the standard gpt-3.5-turbo model but with 4 times the context. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| model name | container name | model link | open-source? | size (billion parameters) | GPU usage | max tokens (prompt + response) | description |
|------------------------------|---------------------------------|-------------------------------------------------------------------------|--------------------------|---------------------------|---------------------------|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| BLOOMZ 7B | transformers-lm-bloomz7b | [link](https://huggingface.co/bigscience/bloomz-7b1) | yes | 7.1B | 33GB | 2,048 tokens | An open-source multilingual instruction-based large language model (46 languages). NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-J 6B | transformers-lm-gptj | [link](https://huggingface.co/EleutherAI/gpt-j-6b) | yes | 6B | 25GB | 2,048 tokens | An open-source English-only large language model which is NOT fine-tuned for instruction following and NOT capable of code generation. NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-3.5 | openai-api-davinci3 | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 4,097 tokens | A multulingual instruction-based large language model which is capable of code generation. Unlike ChatGPT, not optimised for chat. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| ChatGPT | openai-api-chatgpt | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 4,096 tokens | Based on gpt-3.5-turbo -- the most capable of the entire GPT-3/GPT-3.5 models family. Optimized for chat. Able to understand and generate code. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| Open-Assistant Pythia 12B | transformers-lm-oasst12b | [link](https://huggingface.co/OpenAssistant/pythia-12b-sft-v8-7k-steps) | yes | 12B | 26GB (half-precision) | 5,120 tokens | An open-source English-only instruction-based large language model which is NOT good at answering math and coding questions. NB: free of charge. This model is up and running on our servers and can be used for free. |
| GPT-4 | openai-api-gpt4 | [link](https://platform.openai.com/docs/models/gpt-4) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 8,192 tokens | A multilingual instruction-based large language model which is capable of code generation and other complex tasks. More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| GPT-4 32K | openai-api-gpt4-32k | [link](https://platform.openai.com/docs/models/gpt-4) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 32,768 tokens | A multilingual instruction-based large language model which is capable of code generation and other complex tasks. Same capabilities as the base gpt-4 mode but with 4x the context length. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| GPT-JT 6B | transformers-lm-gptjt | [link](https://huggingface.co/togethercomputer/GPT-JT-6B-v1) | yes | 6B | 26GB | 2,048 tokens | An open-source English-only large language model which was fine-tuned for instruction following but is NOT capable of code generation. NB: free of charge. This model is up and running on our servers and can be used for free. |
| ChatGPT 16k | openai-api-chatgpt-16k | [link](https://platform.openai.com/docs/models/gpt-3-5) | no (paid access via API) | supposedly, 175B | - (cannot be run locally) | 16,384 tokens | Same capabilities as the standard gpt-3.5-turbo model but with 4 times the context. NB: paid. You must provide your OpenAI API key to use the model. Your OpenAI account will be charged according to your usage. |
| Anthropic Claude-v1 | anthropic-api-claude-v1 | [link](https://docs.anthropic.com/claude/reference/complete_post) | no (paid access via API) | | - (cannot be run locally) | 9,000 tokens | The largest model, ideal for a wide range of more complex tasks. NB: paid. You must provide your Anthropic API key to use the model. Your Anthropic API account will be charged according to your usage. |
| Anthropic Claude Instant v1 | anthropic-api-claude-instant-v1 | [link](https://docs.anthropic.com/claude/reference/complete_post) | no (paid access via API) | | - (cannot be run locally) | 9,000 tokens | A smaller model with far lower latency, sampling at roughly 40 words/sec! Its output quality is somewhat lower than the latest claude-1 model, particularly for complex tasks. However, it is much less expensive and blazing fast. NB: paid. You must provide your Anthropic API key to use the model. Your Anthropic API account will be charged according to your usage. |
42 changes: 42 additions & 0 deletions annotators/custom_entity_linking/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM tensorflow/tensorflow:1.15.2-gpu

WORKDIR /src

RUN apt-key del 7fa2af80 && \
rm -f /etc/apt/sources.list.d/cuda*.list && \
curl https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb \
-o cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb
RUN apt-get -y update
RUN apt-get install -y build-essential zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget llvm \
libncurses5-dev libncursesw5-dev xz-utils libffi-dev liblzma-dev

RUN apt-get -y update && \
apt-get install -y software-properties-common && \
apt-get update && apt-get install git -y

RUN apt-get install -y sqlite3

ARG LANGUAGE=EN
ENV LANGUAGE ${LANGUAGE}

ARG CONFIG
ARG PORT
ARG SRC_DIR
ARG SED_ARG=" | "

ENV CONFIG=$CONFIG
ENV PORT=$PORT

COPY ./annotators/custom_entity_linking/requirements.txt ./requirements.txt
RUN pip install -r ./requirements.txt

COPY $SRC_DIR .


RUN python -m deeppavlov install $CONFIG && \
python -c "import nltk; nltk.download('stopwords')"

RUN sed -i "s|$SED_ARG|g" "$CONFIG"

CMD gunicorn --workers=1 --timeout 500 server:app -b 0.0.0.0:${PORT}
11 changes: 11 additions & 0 deletions annotators/custom_entity_linking/abstract_rels.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
favorite animal
like animal
favorite book
like read
favorite movie
favorite food
like food
favorite drink
like drink
favorite sport
like sports
34 changes: 34 additions & 0 deletions annotators/custom_entity_linking/custom_entity_linking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"chainer": {
"in": ["user_ids", "entity_substr", "entity_tags"],
"pipe": [
{
"class_name": "src.entity_linking:EntityLinker",
"in": ["user_ids", "entity_substr", "entity_tags"],
"out": ["entity_ids", "entity_conf", "entity_id_tags"],
"load_path": "{DOWNLOADS_PATH}/entity_linking_eng/custom_el_eng_dream",
"rank_in_runtime": true,
"num_entities_for_bert_ranking": 20,
"use_gpu": false,
"include_mention": false,
"num_entities_to_return": 5,
"lemmatize": true,
"use_tags": true,
"use_descriptions": true,
"full_paragraph": true,
"return_confidences": true,
"lang": "en"
}
],
"out": ["entity_substr", "entity_ids", "entity_conf", "entity_id_tags"]
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models",
"TRANSFORMER": "{DOWNLOADS_PATH}/torch_bert_models/bert_small",
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
}
}
}
11 changes: 11 additions & 0 deletions annotators/custom_entity_linking/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Flask==1.1.1
nltk==3.2.5
gunicorn==19.9.0
requests==2.22.0
sentry-sdk==0.12.3
rapidfuzz==0.7.6
deeppavlov==0.17.2
itsdangerous==2.0.1
jinja2<=3.0.3
Werkzeug<=2.0.3
cryptography==2.8
Loading

0 comments on commit 8c3f34d

Please sign in to comment.