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

Multiple models support for LLM #3

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Multiple models support for LLM #3

wants to merge 16 commits into from

Conversation

sgurunat
Copy link
Owner

@sgurunat sgurunat commented Oct 29, 2024

Description

To support multiple llm models for ChatQnA, the changes are incorporated into llms TGI text-generation. Multiple models can be provided in model_configs.json file which will be loaded into MODEL_CONFIGS environment variable.

Type of change

  • New feature (non-breaking change which adds new functionality)

##Changes
To support this the model parameter has been added in the ChatQnAGateway and LLMParams from gateway.py and docarray.py respectively.
Added load_model_configs method in utils.py to validate all the required fields ( 'model_name', 'displayName', 'endpoint', 'minToken', 'maxToken') and then load the configurations. This is added in utils so that it can be reused.
Updated llm.py from llms text-generation tgi to support multiple models and transfer the call to right endpoint.
Updated the template.py file from llms text-generation tgi to have new template for models meta-llama/Meta-Llama-3.1-70B-Instruct" and "meta-llama/Meta-Llama-3.1-8B-Instruct"

sgurunat pushed a commit that referenced this pull request Nov 11, 2024
* Adds an endpoint for image ingestion

Signed-off-by: Melanie Buehler <[email protected]>

* Combined image and video endpoint

Signed-off-by: Melanie Buehler <[email protected]>

* Add test and update README

Signed-off-by: Melanie Buehler <[email protected]>

* fixed variable name for embedding model (#1)

Signed-off-by: okhleif-IL <[email protected]>

* Fixed test script

Signed-off-by: Melanie Buehler <[email protected]>

* Remove redundant function

Signed-off-by: Melanie Buehler <[email protected]>

* get_videos, delete_videos --> get_files, delete_files (#3)

Signed-off-by: okhleif-IL <[email protected]>

* Updates test per review feedback

Signed-off-by: Melanie Buehler <[email protected]>

* Fixed test

Signed-off-by: Melanie Buehler <[email protected]>

* Add support for audio files multimodal data ingestion (#4)

* Add support for audio files multimodal data ingestion

Signed-off-by: dmsuehir <[email protected]>

* Update function name

Signed-off-by: dmsuehir <[email protected]>

---------

Signed-off-by: dmsuehir <[email protected]>

* Change videos_with_transcripts to ingest_with_text

Signed-off-by: Melanie Buehler <[email protected]>

* Add image support to video ingestion with transcript functionality

Signed-off-by: Melanie Buehler <[email protected]>

* Update test and README

Signed-off-by: Melanie Buehler <[email protected]>

* Updated for review suggestions

Signed-off-by: Melanie Buehler <[email protected]>

* Add two tests for ingest_with_text

Signed-off-by: Melanie Buehler <[email protected]>

* LVM TGI Gaudi update for prompts without images (opea-project#7)

* LVM Gaudi TGI update for prompts without images

Signed-off-by: dmsuehir <[email protected]>

* Wording

Signed-off-by: dmsuehir <[email protected]>

* Add a test

Signed-off-by: dmsuehir <[email protected]>

---------

Signed-off-by: dmsuehir <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change dummy image to be b64 encoded instead of the url (opea-project#9)

Signed-off-by: dmsuehir <[email protected]>

* Updates based on review feedback (opea-project#10)

Signed-off-by: dmsuehir <[email protected]>

* Test fix (opea-project#11)

Signed-off-by: dmsuehir <[email protected]>

---------

Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: dmsuehir <[email protected]>
Co-authored-by: dmsuehir <[email protected]>
Co-authored-by: Omar Khleif <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Abolfazl Shahbazi <[email protected]>
XinyuYe-Intel and others added 9 commits November 12, 2024 11:35
* added dpo support.

Signed-off-by: Ye, Xinyu <[email protected]>

* make dpo trainer compatible with newest transformers.

Signed-off-by: Ye, Xinyu <[email protected]>

* added ut for dpo.

Signed-off-by: Ye, Xinyu <[email protected]>

* added training successfulness check in finetuning ut.

Signed-off-by: Ye, Xinyu <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated broken link.

Signed-off-by: Ye, Xinyu <[email protected]>

---------

Signed-off-by: Ye, Xinyu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: ZePan110 <[email protected]>
* Combine CI/CD docker compose yaml files.

Signed-off-by: ZePan110 <[email protected]>

* Fix path issue in script

Signed-off-by: ZePan110 <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Combine CI/CD docker compose yaml files.

Signed-off-by: ZePan110 <[email protected]>

* Fix path issue in script

Signed-off-by: ZePan110 <[email protected]>

* Fix path

Signed-off-by: ZePan110 <[email protected]>

* Combine CI/CD for .github/workflows/_comps-workflow.yml and .github/workflows/_get-image-list.yml

Signed-off-by: ZePan110 <[email protected]>

* Combine compose yaml file

Signed-off-by: ZePan110 <[email protected]>

* Remove CD file

Signed-off-by: ZePan110 <[email protected]>

* Add vllm-fork to CI.

Signed-off-by: ZePan110 <[email protected]>

* Fix issue

Signed-off-by: ZePan110 <[email protected]>

* Add CICD mode

Signed-off-by: ZePan110 <[email protected]>

* Add embedding-reranking-local to compose.yaml

Signed-off-by: ZePan110 <[email protected]>

* Change descriptions

Signed-off-by: ZePan110 <[email protected]>

* Fix script issue.

Signed-off-by: ZePan110 <[email protected]>

* Add new image.

Signed-off-by: ZePan110 <[email protected]>

* remove useless image from llms-compose.yaml

Signed-off-by: ZePan110 <[email protected]>

* Change folder name.

Signed-off-by: ZePan110 <[email protected]>

* Standardize the format of image names.

Signed-off-by: ZePan110 <[email protected]>

* Add commit print

Signed-off-by: ZePan110 <[email protected]>

* Standardize the format of image names

Signed-off-by: ZePan110 <[email protected]>

* Add vllm-arc to compose file.

Signed-off-by: ZePan110 <[email protected]>

* Restore test_agent_langchain_on_intel_hpu.sh

Signed-off-by: ZePan110 <[email protected]>

* Remove useless comments

Signed-off-by: ZePan110 <[email protected]>

---------

Signed-off-by: ZePan110 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add model parameter for CodeGenGateway in gateway.py file

Signed-off-by: sgurunat <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: sgurunat <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* draft a demo code for memory.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add agent short-term memory with langgraph checkpoint.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add save long-term memory func.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add save long-term memory func.

* add timeout for llm response.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix ut with adding -e HABANA_VISIBLE_DEVICES=all.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
opea-project#864)

* Add "megaservice_request_pending" metric

Unlike other megaservice ServiceOrchestrator metrics, this covers (can
cover) also non-streaming requests, as suggested in PR review.

This does not have issues Prometheus-fastapi-instrumentator
"inprogress" metric did:
* Extra instances which have to be differentiated e.g. for CI
* Rely on name -> suffix coming through obscure kwargs calls

Signed-off-by: Eero Tamminen <[email protected]>

* Remove HTTP "inprogress" gauge as redundant

Now that ServiceOrchestrator provides pending metric.

Reverts the "inprogress" metric part of commit a6998a1.

Signed-off-by: Eero Tamminen <[email protected]>

* Document megaservice metrics

Signed-off-by: Eero Tamminen <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Eero Tamminen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants