-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat_fin_report
- Loading branch information
Showing
35 changed files
with
3,256 additions
and
1,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build and push docs image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
# run unless event type is pull_request | ||
if: github.event_name != 'pull_request' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./docs/Dockerfile-deploy | ||
platforms: linux/amd64 | ||
push: true | ||
tags: eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
FROM node:lts-alpine as build | ||
|
||
RUN apk add --no-cache git | ||
|
||
ARG NPM_REGISTRY=https://registry.npmjs.org | ||
ENV NPM_REGISTRY=$NPM_REGISTRY | ||
|
||
# Set github CI environment variable | ||
ARG CI=true | ||
ENV CI=$CI | ||
|
||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to a separate build directory | ||
COPY docs/package*.json /app-build/docs/ | ||
|
||
# Install dependencies in the separate build directory | ||
RUN cd /app-build/docs && \ | ||
npm config set registry $NPM_REGISTRY && \ | ||
npm ci | ||
|
||
# Copy the rest of the application to /app and /app-build | ||
COPY . /app-build | ||
COPY . /app | ||
|
||
# Make sure we have the latest version of the repository | ||
RUN if [ "$CI" = "true" ]; then \ | ||
git fetch --prune --unshallow; \ | ||
fi | ||
|
||
ARG NUM_VERSION=2 | ||
ENV NUM_VERSION=$NUM_VERSION | ||
|
||
# Commit the changes to the repository, just for local testing | ||
# Sometimes, we just want to test the changes in the Dockerfile | ||
RUN git config --global user.email "[email protected]" && \ | ||
git config --global user.name "DB-GPT" && \ | ||
git add . && git commit --no-verify -m "Commit message" | ||
|
||
# New logic for building versions directly in Dockerfile | ||
RUN git config --global --add safe.directory /app && \ | ||
# Record the current position | ||
CURRENT_POSITION=$(git rev-parse --abbrev-ref HEAD) && \ | ||
# Get the latest tags | ||
TAGS=$(git tag --sort=-creatordate | head -n $NUM_VERSION | tac) && \ | ||
# If there are no tags, get the latest commits | ||
if [ -z "$TAGS" ]; then \ | ||
TAGS=$(git log --format="%h" -n $NUM_VERSION | tac); \ | ||
fi && \ | ||
for TAG in $TAGS; do \ | ||
echo "Creating version $TAG"; \ | ||
cd /app/docs && git checkout $TAG; \ | ||
echo "Checked out to tag: $TAG"; \ | ||
# Copy the necessary files to the build directory for each tag | ||
rm -rf /app-build/docs/docs /app-build/docs/sidebars.js /app-build/docs/static /app-build/docs/src && \ | ||
cp -r /app/docs/docs /app-build/docs/ && \ | ||
cp /app/docs/sidebars.js /app-build/docs/ && \ | ||
cp -r /app/docs/static /app-build/docs/ && \ | ||
cp -r /app/docs/src /app-build/docs/; \ | ||
# Create a new version | ||
cd /app-build/docs && npm run docusaurus docs:version $TAG || exit 1; \ | ||
done && \ | ||
# Return to the original position, build dev version | ||
cd /app/docs && git checkout $CURRENT_POSITION && \ | ||
rm -rf /app-build/docs/docs /app-build/docs/sidebars.js /app-build/docs/static /app-build/docs/src && \ | ||
cp -r /app/docs/docs /app-build/docs/ && \ | ||
cp /app/docs/sidebars.js /app-build/docs/ && \ | ||
cp -r /app/docs/static /app-build/docs/ && \ | ||
cp -r /app/docs/src /app-build/docs/; \ | ||
cd /app-build/docs && npm run build && \ | ||
echo $TAGS | tr ' ' '\n' | tac > /app-build/docs/build/versions.txt && \ | ||
echo "latest" >> /app-build/docs/build/versions.txt && \ | ||
echo "Built versions:" && \ | ||
cat /app-build/docs/build/versions.txt | ||
|
||
# For production | ||
FROM nginx:alpine | ||
|
||
# Copy the nginx configuration file | ||
# COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Copy the build output to replace the default nginx contents. | ||
COPY --from=build /app-build/docs/build /usr/share/nginx/html | ||
COPY --from=build /app-build/docs/versioned_docs/ /usr/share/nginx/html/versioned_docs/ | ||
COPY --from=build /app-build/docs/versioned_sidebars/ /usr/share/nginx/html/versioned_sidebars/ | ||
|
||
RUN echo '#!/bin/sh' > /usr/share/nginx/html/versions.sh && \ | ||
echo 'echo "Available versions:"' >> /usr/share/nginx/html/versions.sh && \ | ||
echo 'cat /usr/share/nginx/html/versions.txt' >> /usr/share/nginx/html/versions.sh && \ | ||
chmod +x /usr/share/nginx/html/versions.sh | ||
|
||
EXPOSE 80 | ||
|
||
# Start Nginx server | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
slug: db-gpt-llama-3.1-support | ||
title: DB-GPT Now Supports Meta Llama 3.1 Series Models | ||
authors: fangyinc | ||
tags: [llama, LLM] | ||
--- | ||
|
||
We are thrilled to announce that DB-GPT now supports inference with the Meta Llama 3.1 series models! | ||
|
||
## Introducing Meta Llama 3.1 | ||
|
||
Meta Llama 3.1 is a state-of-the-art series of language models developed by Meta AI. Designed with cutting-edge techniques, the Llama 3.1 models offer unparalleled performance and versatility. Here are some of the key highlights: | ||
|
||
- **Variety of Models**: Meta Llama 3.1 is available in 8B, 70B, and 405B versions, each with both instruction-tuned and base models, supporting contexts up to 128k tokens. | ||
- **Multilingual Support**: Supports 8 languages, including English, German, and French. | ||
- **Extensive Training**: Trained on over 1.5 trillion tokens, utilizing 250 million human and synthetic samples for fine-tuning. | ||
- **Flexible Licensing**: Permissive model output usage allows for adaptation into other large language models (LLMs). | ||
- **Quantization Support**: Available in FP8, AWQ, and GPTQ quantized versions for efficient inference. | ||
- **Performance**: The Llama 3 405B version has outperformed GPT-4 in several benchmarks. | ||
- **Enhanced Efficiency**: The 8B and 70B models have seen a 12% improvement in coding and instruction-following capabilities. | ||
- **Tool and Function Call Support**: Supports tool usage and function calling. | ||
|
||
## How to Access Meta Llama 3.1 | ||
|
||
Your can access the Meta Llama 3.1 models according to [Access to Hugging Face](https://github.com/meta-llama/llama-models?tab=readme-ov-file#access-to-hugging-face). | ||
|
||
For comprehensive documentation and additional details, please refer to the [model card](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md). | ||
|
||
## Using Meta Llama 3.1 in DB-GPT | ||
|
||
Please read the [Source Code Deployment](../docs/installation/sourcecode) to learn how to install DB-GPT from source code. | ||
|
||
Llama 3.1 needs upgrade your transformers >= 4.43.0, please upgrade your transformers: | ||
```bash | ||
pip install --upgrade "transformers>=4.43.0" | ||
``` | ||
|
||
Please cd to the DB-GPT root directory: | ||
```bash | ||
cd DB-GPT | ||
``` | ||
|
||
We assume that your models are stored in the `models` directory, e.g., `models/Meta-Llama-3.1-8B-Instruct`. | ||
|
||
Then modify your `.env` file: | ||
```env | ||
LLM_MODEL=meta-llama-3.1-8b-instruct | ||
# LLM_MODEL=meta-llama-3.1-70b-instruct | ||
# LLM_MODEL=meta-llama-3.1-405b-instruct | ||
## you can also specify the model path | ||
# LLM_MODEL_PATH=models/Meta-Llama-3.1-8B-Instruct | ||
## Quantization settings | ||
# QUANTIZE_8bit=False | ||
# QUANTIZE_4bit=True | ||
## You can configure the maximum memory used by each GPU. | ||
# MAX_GPU_MEMORY=16Gib | ||
``` | ||
|
||
Then you can run the following command to start the server: | ||
```bash | ||
dbgpt start webserver | ||
``` | ||
|
||
Open your browser and visit `http://localhost:5670` to use the Meta Llama 3.1 models in DB-GPT. | ||
|
||
Enjoy the power of Meta Llama 3.1 in DB-GPT! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fangyinc: | ||
name: Fangyin Cheng | ||
title: DB-GPT Core Team | ||
url: https://github.com/fangyinc | ||
image_url: https://avatars.githubusercontent.com/u/22972572?v=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
llama: | ||
label: LLama | ||
permalink: /llama | ||
description: A series of language models developed by Meta AI | ||
LLM: | ||
label: LLM | ||
permalink: /llm | ||
description: Large Language Models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.