<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by 陈发强 on Medium]]></title>
        <description><![CDATA[Stories by 陈发强 on Medium]]></description>
        <link>https://medium.com/@cfqcsunny?source=rss-779dad14dcd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y6O7FH1wVjyej0h2GNxuIA.jpeg</url>
            <title>Stories by 陈发强 on Medium</title>
            <link>https://medium.com/@cfqcsunny?source=rss-779dad14dcd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:44:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cfqcsunny/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The fine-tuning of Text2SQL using CodeLlama surpasses GPT-4!]]></title>
            <link>https://medium.com/@cfqcsunny/the-fine-tuning-of-text2sql-using-codellama-surpasses-gpt-4-ffcfcad6fe53?source=rss-779dad14dcd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffcfcad6fe53</guid>
            <category><![CDATA[text-2-sql]]></category>
            <category><![CDATA[training-datasets]]></category>
            <category><![CDATA[code-llama]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[fine-tune]]></category>
            <dc:creator><![CDATA[陈发强]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 03:40:17 GMT</pubDate>
            <atom:updated>2023-10-21T06:47:25.533Z</atom:updated>
            <content:encoded><![CDATA[<p>We enhance the Text-to-SQL performance by applying Supervised Fine-Tuning (SFT) on large language models.</p><p>As of October 10, 2023, by fine-tuning an open-source model of 13 billion parameters using this project,<strong><em> the execution accuracy on the Spider evaluation dataset has surpassed that of GPT-4!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*Jb3Jrhk8Afa0he8I.png" /></figure><p>Next, I will show you how can fine-tune Text2SQL using CodeLlama.</p><h3><strong>Contents</strong></h3><ol><li><strong><em>Introduction</em></strong></li></ol><p><strong><em>2. Text2SQL Finetune</em></strong></p><p><strong><em>3. Usage</em></strong></p><p><strong><em>4. RoadMap</em></strong></p><h3>1. Introduction</h3><p>We have built an open-source project called <a href="https://github.com/eosphoros-ai/DB-GPT-Hub">DB-GPT-Hub</a>. DB-GPT-Hub is an experimental project utilizing LLMs (Large Language Models) to achieve Text-to-SQL parsing. The project primarily encompasses data collection, data preprocessing, model selection and building, and fine-tuning of weights. Through this series of processes, we aim to enhance Text-to-SQL capabilities while reducing the model training costs, allowing more developers to contribute to the improvement of Text-to-SQL accuracy. Our ultimate goal is to realize automated question-answering capabilities based on databases, enabling users to execute complex database queries through natural language descriptions.</p><p>So far, we have successfully integrated multiple large models and established a complete workflow, including data processing, model SFT (Supervised Fine-Tuning) training, prediction output, and evaluation. The code is readily reusable within this project.</p><p>As of October 10, 2023, by fine-tuning an open-source model of 13 billion parameters using this project, <strong><em>the execution accuracy on the Spider evaluation dataset has surpassed that of GPT-4!</em></strong></p><p>Part of the experimental results have been compiled into the <a href="https://github.com/eosphoros-ai/DB-GPT-Hub/blob/main/docs/eval_llm_result.md">document</a> in this project. By utilizing this project and combining more related data, the execution accuracy on the Spider evaluation set has already reached <strong>0.825</strong>.</p><h3>2. Fine-tuning Text-to-SQL</h3><p>We enhance the Text-to-SQL performance by applying Supervised Fine-Tuning (SFT) on large language models.</p><h4>2.1. Dataset</h4><p>The primary dataset for this project’s examples is the **Spider** dataset:</p><ul><li><a href="https://yale-lily.github.io/spider">SPIDER</a>: A complex text2sql dataset across domains, containing 10,181 natural language queries, 5,693 SQL distributed across 200 separate databases, covering 138 different domains. <a href="https://drive.google.com/uc?export=download&amp;id=1TqleXec_OykOYFREKKtschzY29dUcVAQ">download link</a></li></ul><p>Other text2sql datasets available:</p><ul><li><a href="https://github.com/salesforce/WikiSQL">WikiSQL</a>: A large semantic parsing dataset consisting of 80,654 natural statement expressions and SQL annotations of 24,241 tables. Each query in WikiSQL is limited to the same table and does not contain complex operations such as sorting, or grouping The queries in WikiSQL are limited to the same table and do not include complex operations such as sorting, grouping, subqueries, etc.</li><li><a href="https://xjtu-intsoft.github.io/chase">CHASE</a>: A cross-domain multi-round interactive text2sql Chinese dataset containing a list of 5,459 multi-round questions consisting of 17,940 &lt;query, SQL&gt; binary groups across 280 different domain databases.</li><li><a href="https://bird-bench.github.io/">BIRD-SQL</a>: A large-scale cross-domain text-to-SQL benchmark in English, with a particular focus on large database content. The dataset contains 12,751 text-to-SQL data pairs and 95 databases with a total size of 33.4 GB across 37 occupational domains. The BIRD-SQL dataset bridges the gap between text-to-SQL research and real-world applications by exploring three additional challenges, namely dealing with large and messy database values, external knowledge inference, and optimizing SQL execution efficiency.</li><li><a href="https://yale-lily.github.io/cosql">CoSQL</a> A corpus for building cross-domain conversational text-to-SQL systems. It is a conversational version of the Spider and SParC tasks. CoSQL consists of 30k+ rounds and 10k+ annotated SQL queries from Wizard-of-Oz’s collection of 3k conversations querying 200 complex databases across 138 domains. Each conversation simulates a realistic DB query scenario in which a staff member explores the database as a user and a SQL expert uses SQL to retrieve answers, clarify ambiguous questions, or otherwise inform.</li><li>Following the processing template of <a href="https://github.com/NumbersStationAI/NSQL">NSQL</a>, the dataset underwent basic processing, yielding approximately <a href="https://huggingface.co/datasets/Healthy13/Text2SQL/tree/main">20K dataset</a></li></ul><h4>2.2. Model</h4><p>DB-GPT-Hub currently supports the following base models:</p><ul><li>CodeLlama</li><li>Baichuan2</li><li>LLaMa/LLaMa2</li><li>Falcon</li><li>Qwen</li><li>XVERSE</li><li>ChatGLM2</li><li>internlm</li></ul><p>The model is fine-tuned based on a quantization bit of 4 using Quantized Learning over Redundant Architecture (QLoRA). The minimum hardware requirements for this can be referred to as follows:</p><pre>| Model Parameters | GPU RAM | CPU RAM| DISK |<br>| - - - - | - - - - - - - - | - - - - | - - -|<br>| 7b      | 6GB    | 3.6GB  | 36.4GB  |  -   |<br>| 13b     | 13.4GB | 5.9GB  | 60.2GB  |  -   |<br><br> <br>All the related parameters are set to the minimum, with a batch size of 1 and a max length of 512. Based on experience, for better performance, it is recommended to set the related length values to 1024 or 2048.</pre><h3>3. Usage</h3><h4>3.1. Environment preparation</h4><pre>git clone https://github.com/eosphoros-ai/DB-GPT-Hub.git<br>cd DB-GPT-Hub<br>conda create -n dbgpt_hub python=3.10 <br>conda activate dbgpt_hub<br>pip install -r requirements.txt <br>mkdir model</pre><h4>3.2. Data Preparation</h4><p>DB-GPT-Hub uses the information matching generation method for data preparation, i.e. the SQL + Repository generation method that combines table information. This method combines data table information to better understand the structure and relationships of the data table and is suitable for generating SQL statements that meet the requirements.</p><p>Download the <a href="https://drive.google.com/uc?export=download&amp;id=1TqleXec_OykOYFREKKtschzY29dUcVAQ">Spider dataset </a>from the Spider dataset link. By default, after downloading and extracting the data, place it in the dbgpt_hub/data directory, i.e., the path should be `dbgpt_hub/data/spider`.</p><p>For the data preprocessing part, simply **run the following script** :</p><pre>## generate train and dev(eval) data<br>sh dbgpt_hub/scripts/gen_train_eval_data.sh</pre><p>In the directory `dbgpt_hub/data/`, you will find the newly generated training file example_text2sql_train.json and testing file example_text2sql_dev.json, containing 8659 and 1034 entries respectively.</p><p>The data in the generated JSON looks something like this:</p><pre>{<br> &quot;db_id&quot;: &quot;department_management&quot;,<br> &quot;instruction&quot;: &quot;I want you to act as a SQL terminal in front of an example database, you need only to return the sql command to me.Below is an instruction that describes a task, Write a response that appropriately completes the request.\n\&quot;\n##Instruction:\ndepartment_management contains tables such as department, head, management. Table department has columns such as Department_ID, Name, Creation, Ranking, Budget_in_Billions, Num_Employees. Department_ID is the primary key.\nTable head has columns such as head_ID, name, born_state, age. head_ID is the primary key.\nTable management has columns such as department_ID, head_ID, temporary_acting. department_ID is the primary key.\nThe head_ID of management is the foreign key of head_ID of head.\nThe department_ID of management is the foreign key of Department_ID of department.\n\n&quot;,<br> &quot;input&quot;: &quot;###Input:\nHow many heads of the departments are older than 56 ?\n\n###Response:&quot;,<br> &quot;output&quot;: &quot;SELECT count(*) FROM head WHERE age &gt; 56&quot;,<br> &quot;history&quot;: []<br> },</pre><h4>3.3. Model fine-tuning</h4><p>The model fine-tuning supports both LoRA and QLoRA methods. We can run the following command to fine-tune the model. By default, with the parameter — quantization_bit, it uses the QLoRA fine-tuning method. To switch to LoRAs, simply remove the related parameter from the script.<br>Run the command:</p><pre>sh dbgpt_hub/scripts/train_sft.sh</pre><p>After fine-tuning, the model weights will be saved by default in the adapter folder, specifically in the dbgpt_hub/output/adapter directory.</p><p>If you’re using **multi-GPU training and want to utilize deepseed**, you should modify the default content in train_sft.sh. The change is:</p><pre>CUDA_VISIBLE_DEVICES=0 python dbgpt_hub/train/sft_train.py \<br> - quantization_bit 4 <br><br># change to ： <br>deepspeed - num_gpus 2 dbgpt_hub/train/sft_train.py \<br> - deepspeed dbgpt_hub/configs/ds_config.json \<br> - quantization_bit 4 </pre><p>The other parts that are omitted (…) can be kept consistent. If you want to change the default deepseed configuration, go into the `dbgpt_hub/configs` directory and make changes to ds_config.json as needed.</p><p>In the script, during fine-tuning, different models correspond to key parameters lora_target and template, as shown in the following table:</p><pre>| model name                                               |  lora_target       | template |<br>| -------------------------------------------------------- |  ----------------- |----------|<br>| [LLaMA-2](https://huggingface.co/meta-llama)             |  q_proj,v_proj     | llama2   |<br>| [CodeLlama-2](https://huggingface.co/codellama/)         |  q_proj,v_proj     | llama2   |<br>| [Baichuan2](https://github.com/baichuan-inc/Baichuan2)   |  W_pack            | baichuan2|<br>| [InternLM](https://github.com/InternLM/InternLM)         |  q_proj,v_proj     | intern   |<br>| [Qwen](https://github.com/QwenLM/Qwen-7B)                |  c_attn            | chatml   |<br>| [XVERSE](https://github.com/xverse-ai/XVERSE-13B)        |  q_proj,v_proj     | xverse   |<br>| [ChatGLM2](https://github.com/THUDM/ChatGLM2-6B)         |  query_key_value   | chatglm2 |<br>| [LLaMA](https://github.com/facebookresearch/llama)       |  q_proj,v_proj     | -        |<br>| [BLOOM](https://huggingface.co/bigscience/bloom)         |  query_key_value   | -        |<br>| [BLOOMZ](https://huggingface.co/bigscience/bloomz)       |  query_key_value   | -        |<br>| [Baichuan](https://github.com/baichuan-inc/baichuan-13B) |  W_pack            | baichuan |<br>| [Falcon](https://huggingface.co/tiiuae/falcon-7b)        |  query_key_value   | -        |</pre><p>In `train_sft.sh`, other key parameters are as follows:</p><pre>&gt; quantization_bit: Indicates whether quantization is applied, with valid values being [4 or 8]. <br>&gt; model_name_or_path: The path of the LLM (Large Language Model). <br>&gt; dataset: Specifies the name of the training dataset configuration, corresponding to the outer key value in dbgpt_hub/data/dataset_info.json, such as example_text2sql. <br>&gt; max_source_length: The length of the text input into the model. If computing resources allow, it can be set as large as possible, like 1024 or 2048. <br>&gt; max_target_length: The length of the SQL content output by the model; 512 is generally sufficient. <br>&gt; output_dir: The output path of the Peft module during SFT (Supervised Fine-Tuning), set by default to `dbgpt_hub/output/adapter/` . <br>&gt; per_device_train_batch_size: The size of the batch. If computing resources allow, it can be set larger; the default is 1. <br>&gt; gradient_accumulation_steps: The number of steps for accumulating gradients before an update. <br>&gt; save_steps: The number of steps at which model checkpoints are saved; it can be set to 100 by default. <br>&gt; num_train_epochs: The number of epochs for training the dataset.</pre><h4>3.4. Model Predict</h4><p>Under the project directory ./dbgpt_hub/output/pred/, this folder is the default output location for model predictions(if not exist, just mkdir).</p><pre>sh ./dbgpt_hub/scripts/predict_sft.sh</pre><p>In the script, by default with the parameter ` — quantization_bit`, it predicts using QLoRA. Removing it switches to the LoRA prediction method.<br>The value of the parameter ` — predicted_out_filename` is the file name of the model’s predicted results, which can be found in the `dbgpt_hub/output/pred` directory.</p><h4>3.5 Model Weights</h4><p>You can find the corresponding model weights we uploaded in August from Huggingface. <a href="https://huggingface.co/eosphoros">hg-eosphoros-ai</a></p><p>We will soon release a new model and improved weights that outperform GPT-4 in accuracy on the spider evaluation set.</p><p><strong>3.5.1 Model and fine-tuned weight merging</strong></p><p>If you need to merge the weights of the trained base model and the fine-tuned Peft module to export a complete model, execute the following model export script:</p><pre>sh ./dbgpt_hub/scripts/export_merge.sh</pre><p>Be sure to replace the parameter path values in the script with the paths corresponding to your project.</p><h4>3.6 Model Evaluation</h4><p>To evaluate model performance on the dataset, the default is the spider dev dataset. Run the following command:</p><pre>python dbgpt_hub/eval/evaluation.py - plug_value - input Your_model_pred_file</pre><p>You can find the results of our latest review and part of the experiment results <a href="https://github.com/eosphoros-ai/DB-GPT-Hub/blob/main/docs/eval_llm_result.md">here</a></p><h4>4. RoadMap</h4><p>The whole process will be divided into three phases:</p><p><strong>Stage 1:</strong></p><ul><li>Set up the basic framework, enabling end-to-end workflow from data processing, model SFT training, and prediction output to evaluation based on multiple large models. As of 20230804, the entire pipeline has been established. Now, we have supported as follows:</li><li><em>CodeLlama</em></li><li><em>Baichuan2</em></li><li><em>LLaMa/LLaMa2</em></li><li><em>Falcon</em></li><li><em>Qwen</em></li><li><em>XVERSE</em></li><li><em>ChatGLM2</em></li></ul><p><strong>Stage 2:</strong></p><ul><li>Optimize model performance, and support fine-tuning more different models in various ways before `20231010`</li><li>Optimize `prompts`<br>Release evaluation results, and optimized models open to peers.</li></ul><p><strong>Stage 3:</strong></p><ul><li>Optimized based on more papers, such as RESDSQL and others. Combined with our community’s sibling project <a href="https://github.com/eosphoros-ai/Awesome-Text2SQL">Awesome-Text2SQL</a> <a href="https://github.com/eosphoros-ai/Awesome-Text2SQL)for">for</a> further enhancements.</li></ul><h3>Acknowledgments</h3><p>Our work is primarily based on the foundation of numerous open-source contributions. Thanks to the following open-source projects</p><ul><li><a href="https://github.com/eosphoros-ai/DB-GPT-Hub">https://github.com/eosphoros-ai/DB-GPT-Hub</a></li><li><a href="https://github.com/eosphoros-ai/DB-GPT-Hub">https://github.com/eosphoros-ai/DB-GPT</a></li><li><a href="https://github.com/eosphoros-ai/Awesome-Text2SQL)for">https://github.com/eosphoros-ai/Awesome-Text2SQL</a></li><li><a href="https://github.com/ElementAI/spider">https://github.com/ElementAI/spider</a></li><li><a href="https://yale-lily.github.io/cosql">https://yale-lily.github.io/cosql</a></li><li><a href="https://xjtu-intsoft.github.io/chase/">https://xjtu-intsoft.github.io/chase</a></li><li><a href="https://bird-bench.github.io/">https://bird-bench.github.io</a></li><li><a href="https://github.com/facebookresearch/llama/tree/main">https://github.com/facebookresearch/llama/tree/main</a></li><li><a href="https://github.com/cuplv/text-to-sql-wizardcoder">https://github.com/cuplv/text-to-sql-wizardcode</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffcfcad6fe53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DB-GPT: Revolutionizing Database Interactions with Private LLM Technology]]></title>
            <link>https://medium.com/@cfqcsunny/db-gpt-revolutionizing-database-interactions-with-private-llm-technology-3d77689bc1d5?source=rss-779dad14dcd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d77689bc1d5</guid>
            <dc:creator><![CDATA[陈发强]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 10:03:29 GMT</pubDate>
            <atom:updated>2023-06-08T10:07:39.657Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What is DB-GPT?</strong></h3><p>As large models are released and iterated upon, they are becoming increasingly intelligent. However, in the process of using large models, we face significant challenges in data security and privacy. We need to ensure that our sensitive data and environments remain completely controlled and avoid any data privacy leaks or security risks. Based on this, we have launched the DB-GPT project to build a complete private large model solution for all database-based scenarios. This solution supports local deployment, allowing it to be applied not only in independent private environments but also to be independently deployed and isolated according to business modules, ensuring that the ability of large models is absolutely private, secure, and controllable.</p><p>DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment. With this solution, you can be assured that there is no risk of data leakage, and your data is 100% private and secure.</p><p>open source: <a href="https://github.com/csunny/DB-GPT">https://github.com/csunny/DB-GPT</a></p><h3><strong>News</strong></h3><p>- [2023/06/01]🔥 On the basis of the Vicuna-13B basic model, task chain calls are implemented through plugins. For example, the implementation of creating a database with a single sentence.[demo](./assets/auto_plugin.gif)<br>- [2023/06/01]🔥 QLoRA guanaco(7b, 13b, 33b) support.<br>- [2023/05/28]🔥 Learning from crawling data from the Internet [demo](./assets/chaturl_en.gif)<br>- [2023/05/21] Generate SQL and execute it automatically. [demo](./assets/auto_sql_en.gif)<br>- [2023/05/15] Chat with documents. [demo](./assets/new_knownledge_en.gif)<br>- [2023/05/06] SQL generation and diagnosis. [demo](./assets/demo_en.gif)</p><h3><strong>Features</strong></h3><p>Currently, we have released multiple key features, which are listed below to demonstrate our current capabilities:</p><p>- SQL language capabilities<br> — SQL generation<br> — SQL diagnosis<br>- Private domain Q&amp;A and data processing<br> — Database knowledge Q&amp;A<br> — Data processing<br>- Plugins<br> — Support custom plugin execution tasks and natively support the Auto-GPT plugin, such as:<br> — Automatic execution of SQL and retrieval of query results<br> — Automatic crawling and learning of knowledge<br>- Unified vector storage/indexing of knowledge base<br> — Support for unstructured data such as PDF, Markdown, CSV, and WebURL</p><p>- Milti LLMs Support<br> — Supports multiple large language models, currently supporting Vicuna (7b, 13b), ChatGLM-6b (int4, int8), guanaco(7b,13b,33b) <br> — TODO: codegen2, codet5p</p><h3><strong>Demo</strong></h3><p>Run on an RTX 4090 GPU.<br>&lt;p align=”center”&gt;<br> &lt;img src=”./assets/auto_sql_en.gif” width=”680px” /&gt;<br>&lt;/p&gt;</p><p>&lt;p align=”center”&gt;<br> &lt;img src=”./assets/chaturl_en.gif” width=”680px” /&gt;<br>&lt;/p&gt;</p><p>&lt;p align=”center”&gt;<br> &lt;img src=”./assets/new_knownledge_en.gif” width=”680px” /&gt;<br>&lt;/p&gt;</p><h3><strong>Introduction</strong></h3><p>DB-GPT creates a vast model operating system using [FastChat](<a href="https://github.com/lm-sys/FastChat">https://github.com/lm-sys/FastChat</a>) and offers a large language model powered by [Vicuna](<a href="https://huggingface.co/Tribbiani/vicuna-7b">https://huggingface.co/Tribbiani/vicuna-7b</a>). In addition, we provide private domain knowledge base question-answering capability through LangChain. Furthermore, we also provide support for additional plugins, and our design natively supports the Auto-GPT plugin.</p><p>Is the architecture of the entire DB-GPT shown in the following figure:</p><p>&lt;p align=”center”&gt;<br> &lt;img src=”./assets/DB-GPT.png” width=”680px” /&gt;<br>&lt;/p&gt;</p><p>The core capabilities mainly consist of the following parts:<br>1. Knowledge base capability: Supports private domain knowledge base question-answering capability.<br>2. Large-scale model management capability: Provides a large model operating environment based on FastChat.<br>3. Unified data vector storage and indexing: Provides a uniform way to store and index various data types.<br>4. Connection module: Used to connect different modules and data sources to achieve data flow and interaction.<br>5. Agent and plugins: Provides Agent and plugin mechanisms, allowing users to customize and enhance the system’s behavior.<br>6. Prompt generation and optimization: Automatically generates high-quality prompts and optimizes them to improve system response efficiency.<br>7. Multi-platform product interface: Supports various client products, such as web, mobile applications, and desktop applications.</p><p>Below is a brief introduction to each module:</p><h4><strong>Knowledge base capability</strong></h4><p>As the knowledge base is currently the most significant user demand scenario, we natively support the construction and processing of knowledge bases. At the same time, we also provide multiple knowledge base management strategies in this project, such as:<br>1. Default built-in knowledge base<br>2. Custom addition of knowledge bases<br>3. Various usage scenarios such as constructing knowledge bases through plugin capabilities and web crawling. Users only need to organize the knowledge documents, and they can use our existing capabilities to build the knowledge base required for the large model.</p><h4><strong>LLMs Management</strong></h4><p>In the underlying large model integration, we have designed an open interface that supports integration with various large models. At the same time, we have a very strict control and evaluation mechanism for the effectiveness of the integrated models. In terms of accuracy, the integrated models need to align with the capability of ChatGPT at a level of 85% or higher. We use higher standards to select models, hoping to save users the cumbersome testing and evaluation process in the process of use.</p><h4><strong>Vector storage and indexing</strong></h4><p>In order to facilitate the management of knowledge after vectorization, we have built-in multiple vector storage engines, from memory-based Chroma to distributed Milvus. Users can choose different storage engines according to their own scenario needs. The storage of knowledge vectors is the cornerstone of AI capability enhancement. As the intermediate language for interaction between humans and large language models, vectors play a very important role in this project.</p><h4><strong>Connections</strong></h4><p>In order to interact more conveniently with users’ private environments, the project has designed a connection module, which can support connection to databases, Excel, knowledge bases, and other environments to achieve information and data exchange.</p><h4><strong>Agent and Plugin</strong></h4><p>The ability of Agent and Plugin is the core of whether large models can be automated. In this project, we natively support the plugin mode, and large models can automatically achieve their goals. At the same time, in order to give full play to the advantages of the community, the plugins used in this project natively support the Auto-GPT plugin ecology, that is, Auto-GPT plugins can directly run in our project.</p><h4><strong>Prompt Automatic Generation and Optimization</strong></h4><p>Prompt is a very important part of the interaction between the large model and the user, and to a certain extent, it determines the quality and accuracy of the answer generated by the large model. In this project, we will automatically optimize the corresponding prompt according to user input and usage scenarios, making it easier and more efficient for users to use large language models.</p><h4><strong>Multi-Platform Product Interface</strong></h4><p>TODO: In terms of terminal display, we will provide a multi-platform product interface, including PC, mobile phone, command line, Slack and other platforms.</p><h3><strong>Deployment</strong></h3><h4><strong>1. Hardware Requirements</strong></h4><p>As our project has the ability to achieve ChatGPT performance of over 85%, there are certain hardware requirements. However, overall, the project can be deployed and used on consumer-grade graphics cards. The specific hardware requirements for deployment are as follows:</p><p>| GPU | VRAM Size | Performance |<br>| — — — — — | — — — — — | — — — — — — — — — — — — — — — — — — — — — — |<br>| RTX 4090 | 24 GB | Smooth conversation inference |<br>| RTX 3090 | 24 GB | Smooth conversation inference, better than V100 |<br>| V100 | 16 GB | Conversation inference possible, noticeable stutter |</p><h4><strong>2. Install</strong></h4><p>This project relies on a local MySQL database service, which you need to install locally. We recommend using Docker for installation.</p><p>```bash<br>$ docker run — name=mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=aa123456 -dit mysql:latest<br>```<br>We use [Chroma embedding database](<a href="https://github.com/chroma-core/chroma">https://github.com/chroma-core/chroma</a>) as the default for our vector database, so there is no need for special installation. If you choose to connect to other databases, you can follow our tutorial for installation and configuration. <br>For the entire installation process of DB-GPT, we use the miniconda3 virtual environment. Create a virtual environment and install the Python dependencies.<br>```<br>python&gt;=3.10<br>conda create -n dbgpt_env python=3.10<br>conda activate dbgpt_env<br>pip install -r requirements.txt<br>```</p><h4>3. Run</h4><p>You can refer to this document to obtain the Vicuna weights: [Vicuna](<a href="https://github.com/lm-sys/FastChat/blob/main/README.md#model-weights">https://github.com/lm-sys/FastChat/blob/main/README.md#model-weights</a>) .</p><p>If you have difficulty with this step, you can also directly use the model from [this link](<a href="https://huggingface.co/Tribbiani/vicuna-7b">https://huggingface.co/Tribbiani/vicuna-7b</a>) as a replacement.</p><p>1. Run server<br>```bash<br>$ python pilot/server/llmserver.py<br>```</p><p>Run gradio webui</p><p>```bash<br>$ python pilot/server/webserver.py<br>```<br>Notice: the webserver need to connect llmserver, so you need change the .env file. change the MODEL_SERVER = “<a href="http://127.0.0.1:8000/">http://127.0.0.1:8000</a>&quot; to your address. It’s very important.</p><p>## Usage Instructions</p><p>We provide a user interface for Gradio, which allows you to use DB-GPT through our user interface. Additionally, we have prepared several reference articles (written in Chinese) that introduce the code and principles related to our project.<br>- [LLM Practical In Action Series (1) — Combined Langchain-Vicuna Application Practical](<a href="https://medium.com/@cfqcsunny/llm-practical-in-action-series-1-combined-langchain-vicuna-application-practical-701cd0413c9f">https://medium.com/@cfqcsunny/llm-practical-in-action-series-1-combined-langchain-vicuna-application-practical-701cd0413c9f</a>)</p><h4>Multi LLMs Usage</h4><p>To use multiple models, modify the LLM_MODEL parameter in the .env configuration file to switch between the models.</p><h4>Multi Language Usage</h4><p>To use multiple language model, modify the LLM_MODEL parameter in the .env configuration file to switch between the models.</p><p>In the .env configuration file, modify the LANGUAGE parameter to switch between different languages, the default is English (Chinese zh, English en, other languages ​​to be added)</p><h4>Create your own knowledge repository:</h4><p>1.Place personal knowledge files or folders in the pilot/datasets directory.</p><p>2.set .env configuration set your vector store type, eg:VECTOR_STORE_TYPE=Chroma, now we support Chroma and Milvus(version &gt; 2.1)</p><p>3.Run the knowledge repository script in the tools directory.</p><p>```bash<br>&amp; python tools/knowledge_init.py</p><p>— vector_name : your vector store name default_value:default<br> — append: append mode, True:append, False: not append default_value:False</p><p>```</p><p>4.Add the knowledge repository in the interface by entering the name of your knowledge repository (if not specified, enter “default”) so you can use it for Q&amp;A based on your knowledge base.</p><p>Note that the default vector model used is text2vec-large-chinese (which is a large model, so if your personal computer configuration is not enough, it is recommended to use text2vec-base-chinese). Therefore, ensure that you download the model and place it in the models directory.</p><p>If nltk-related errors occur during the use of the knowledge base, you need to install the nltk toolkit. For more details, please refer to: [nltk documents](<a href="https://www.nltk.org/data.html">https://www.nltk.org/data.html</a>)<br>Run the Python interpreter and type the commands:</p><p>```bash<br>&gt;&gt;&gt; import nltk<br>&gt;&gt;&gt; nltk.download()<br>```</p><h3>Acknowledgement</h3><p>This project is standing on the shoulders of giants and is not going to work without the open-source communities. Special thanks to the following projects for their excellent contribution to the AI industry:<br>- [FastChat](<a href="https://github.com/lm-sys/FastChat">https://github.com/lm-sys/FastChat</a>) for providing chat services<br>- [vicuna-13b](<a href="https://lmsys.org/blog/2023-03-30-vicuna/">https://lmsys.org/blog/2023-03-30-vicuna/</a>) as the base model<br>- [langchain](<a href="https://langchain.readthedocs.io/">https://langchain.readthedocs.io/</a>) tool chain<br>- [Auto-GPT](<a href="https://github.com/Significant-Gravitas/Auto-GPT">https://github.com/Significant-Gravitas/Auto-GPT</a>) universal plugin template<br>- [Hugging Face](<a href="https://huggingface.co/">https://huggingface.co/</a>) for big model management<br>- [Chroma](<a href="https://github.com/chroma-core/chroma">https://github.com/chroma-core/chroma</a>) for vector storage<br>- [Milvus](<a href="https://milvus.io/">https://milvus.io/</a>) for distributed vector storage<br>- [ChatGLM](<a href="https://github.com/THUDM/ChatGLM-6B">https://github.com/THUDM/ChatGLM-6B</a>) as the base model<br>- [llama_index](<a href="https://github.com/jerryjliu/llama_index">https://github.com/jerryjliu/llama_index</a>) for enhancing database-related knowledge using [in-context learning](<a href="https://arxiv.org/abs/2301.00234">https://arxiv.org/abs/2301.00234</a>) based on existing knowledge bases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d77689bc1d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM Practical In Action Series (1) — Combined Langchain-Vicuna Application Practical]]></title>
            <link>https://medium.com/@cfqcsunny/llm-practical-in-action-series-1-combined-langchain-vicuna-application-practical-701cd0413c9f?source=rss-779dad14dcd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/701cd0413c9f</guid>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[陈发强]]></dc:creator>
            <pubDate>Fri, 12 May 2023 15:12:33 GMT</pubDate>
            <atom:updated>2023-05-13T06:04:38.698Z</atom:updated>
            <content:encoded><![CDATA[<p>LLM Practical In Action Series (1) — Combined Langchain-Vicuna Application Practical</p><h3>Intruction</h3><p>This article mainly introduces the In Action and QA use of the external <a href="https://www.oceanbase.com/">OceanBase</a> knowledge base project based on Langchain and Vicuna-13B. Project address:</p><p><a href="https://github.com/csunny/DB-GPT">https://github.com/csunny/DB-GPT</a></p><p>Since the release of the LLaMA large model by Meta, models fine-tuned around LLaMA have emerged in an endless stream. From alpaca to vicuna, to the just-released Hua Tuo GPT, a fine-tuning large-scale model in the vertical field of traditional Chinese medicine, it can be said that the scene is boundless. But the most famous and effective one is vicuna-13B. As shown in the figure below, among many large models, the effect of Vicuna-13B is very close to that of ChatGPT, with 92% of the effect. What does this mean? It means that we can solve most of the tasks and requirements based on the open source Vicuna-13B. Of course, simple requirements such as QA of the plug-in knowledge base are naturally out of the question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sz0Me-ffxdE9OMSd.png" /></figure><h3>What is Langchian?</h3><p>There is no doubt that Langchain is currently the hottest LLM framework in the field of large language models.</p><p>LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model via an API, but will also:</p><ul><li><em>Be data-aware</em>: connect a language model to other sources of data</li><li><em>Be agentic</em>: allow a language model to interact with its environment</li></ul><p>The above is the design concept of Langchain, It’s very simple, but enough nature. Yes, simple enough, but very close to the essence. We are also deeply attracted by the concept of Langchain. So here we are~</p><h3>Design</h3><p>Since it is a practical project, before the project starts, it is necessary for us to make a clear review of the overall structure of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*WSf3jqfuzCwhXtmB.png" /></figure><p>As shown in the figure, it is our overall architecture diagram. From the figure, we can see that there is a line on the left that is the path of Knowledge Base -&gt; Embedding -&gt; Vector Storage -&gt; Large Model (Vicuna-13B) -&gt; Generate. In our article, we rely on this path plug-in knowledge base for reasoning and summarization to complete the work of QA.</p><p>Therefore, we split the above process into four steps as shown below.</p><p>Knowledge base preparation: As shown, because we are GPT for the DB field, we have prepared and classified the documents of mainstream databases.</p><p>Embedding: The step of embedding is to convert the text into a vector for storage. Of course, the storage medium is a vector database. For the understanding of the vector database, you can learn about it from here.</p><p>The knowledge after Embedding will be stored in the vector database for later retrieval.</p><p>Using the ability of large models, ICL (In-Context-Learning) enables large models to achieve reasoning and summarization based on existing knowledge.</p><p>In this way, we can realize a project based on the existing knowledge base QA.</p><h3>Code</h3><p>Since it is actual combat, the code must be indispensable. After all, what we have always insisted on is: talk is cheap, show me the code.</p><h3>Model loader</h3><p>At present, the basic mainstream models are based on the HuggingFace standard, so the model loading code is actually very simple. As shown below, to load the class for the model, the required parameters only need to pass a model_path. In this class, we have implemented a method, the loader method, through which we can obtain two objects. 1. tokenizer 2. model, according to these two objects, we will get a model, the following things, just pay attention to use.</p><pre>class ModelLoader:<br>    &quot;&quot;&quot;Model loader is a class for model load<br>    <br>      Args: model_path<br>     <br>    &quot;&quot;&quot;<br>    kwargs = {}<br>    def __init__(self, <br>                 model_path) -&gt; None:<br>                     self.device = &quot;cuda&quot; if torch.cuda.is_available() else &quot;cpu&quot;<br>                     self.model_path = model_path <br>                     self.kwargs = {<br>                         &quot;torch_dtype&quot;: torch.float16,<br>                         &quot;device_map&quot;: &quot;auto&quot;,<br>                     }<br>    def loader(self, num_gpus, load_8bit=False, debug=False):<br>        if self.device == &quot;cpu&quot;:<br>            kwargs = {}<br>        elif self.device == &quot;cuda&quot;:<br>            kwargs = {&quot;torch_dtype&quot;: torch.float16}<br>            if num_gpus == &quot;auto&quot;:<br>                kwargs[&quot;device_map&quot;] = &quot;auto&quot;<br>            else:<br>                num_gpus = int(num_gpus)<br>                if num_gpus != 1:<br>                    kwargs.update({<br>                        &quot;device_map&quot;: &quot;auto&quot;,<br>                        &quot;max_memory&quot;: {i: &quot;13GiB&quot; for i in range(num_gpus)},<br>                    })<br>        else:<br>            raise ValueError(f&quot;Invalid device: {self.device}&quot;)<br>        if &quot;chatglm&quot; in self.model_path:<br>            tokenizer = AutoTokenizer.from_pretrained(self.model_path, trust_remote_code=True)<br>            model = AutoModel.from_pretrained(self.model_path, trust_remote_code=True).half().cuda()<br>        else:<br>            tokenizer = AutoTokenizer.from_pretrained(self.model_path, use_fast=False)<br>            model = AutoModelForCausalLM.from_pretrained(self.model_path,<br>                                                         low_cpu_mem_usage=True, **kwargs)<br>        if load_8bit:<br>            compress_module(model, self.device)<br>        if (self.device == &quot;cuda&quot; and num_gpus == 1):<br>            model.to(self.device)<br>        if debug:<br>            print(model)<br>        return model, tokenizer</pre><h3>knowledge base preparation</h3><p>Prepare the knowledge base, there is nothing special to say, it can be pdf, txt, md, etc. Here, we are preparing an md document, and the knowledge base is based on the open source <a href="https://www.oceanbase.com/">OceanBase</a> official document. Prepared knowledge base address: <a href="https://www.oceanbase.com/">OceanBase</a> documentation.</p><p>Note: Here is a special explanation why the pdf is not downloaded directly. Two reasons 1. OB pdf documents have many formats, and these formats will also be preserved during vector processing. The knowledge after default processing is not flattened, which is not conducive to the subsequent use of large models. 2. The pdf document is relatively large, and the process of extracting vectors through the model will be relatively long when running locally. Therefore, we have prepared a simple MarkDown file for demonstration.</p><p>Knowledge is turned into vectors and stored in vector databases</p><p>Here we implement a Knowledge2Vector class. This class, just as its name implies, is to convert the knowledge base into a vector. Of course, after we convert it into a vector, it will be persisted to the database storage. (Question 1: The class name does not reflect the storage database, should we think about it? KnownLedge2VectorStore would be better?)</p><pre>class KnownLedge2Vector:<br>&quot;&quot;&quot;KnownLedge2Vector class is order to load document to vector <br>    and persist to vector store.<br>        <br>        Args: <br>           - model_name<br>        Usage:<br>            k2v = KnownLedge2Vector()<br>            persist_dir = os.path.join(VECTORE_PATH, &quot;.vectordb&quot;) <br>            print(persist_dir)<br>            for s, dc in k2v.query(&quot;what is oceanbase?&quot;):<br>                print(s, dc.page_content, dc.metadata)<br>    &quot;&quot;&quot;<br>    embeddings: object = None <br>    model_name = LLM_MODEL_CONFIG[&quot;sentence-transforms&quot;]<br>    top_k: int = VECTOR_SEARCH_TOP_K<br>    def __init__(self, model_name=None) -&gt; None:<br>        if not model_name:<br>            # use default embedding model<br>            self.embeddings = HuggingFaceEmbeddings(model_name=self.model_name) <br>        <br>    def init_vector_store(self):<br>        persist_dir = os.path.join(VECTORE_PATH, &quot;.vectordb&quot;)<br>        print(&quot;向量数据库持久化地址: &quot;, persist_dir)<br>        if os.path.exists(persist_dir):<br>            # 从本地持久化文件中Load<br>            print(&quot;从本地向量加载数据...&quot;)<br>            vector_store = Chroma(persist_directory=persist_dir, embedding_function=self.embeddings)<br>            # vector_store.add_documents(documents=documents)<br>        else:<br>            documents = self.load_knownlege()<br>            # 重新初始化<br>            vector_store = Chroma.from_documents(documents=documents, <br>                                                 embedding=self.embeddings,<br>                                                 persist_directory=persist_dir)<br>            vector_store.persist()<br>        return vector_store <br>    def load_knownlege(self):<br>        docments = []<br>        for root, _, files in os.walk(DATASETS_DIR, topdown=False):<br>            for file in files:<br>                filename = os.path.join(root, file)<br>                docs = self._load_file(filename)<br>                # 更新metadata数据<br>                new_docs = [] <br>                for doc in docs:<br>                    doc.metadata = {&quot;source&quot;: doc.metadata[&quot;source&quot;].replace(DATASETS_DIR, &quot;&quot;)} <br>                    print(&quot;文档2向量初始化中, 请稍等...&quot;, doc.metadata)<br>                    new_docs.append(doc)<br>                docments += new_docs<br>        return docments<br>    def _load_file(self, filename):<br>        # 加载文件<br>        if filename.lower().endswith(&quot;.pdf&quot;):<br>            loader = UnstructuredFileLoader(filename) <br>            text_splitor = CharacterTextSplitter()<br>            docs = loader.load_and_split(text_splitor)<br>        else:<br>            loader = UnstructuredFileLoader(filename, mode=&quot;elements&quot;)<br>            text_splitor = CharacterTextSplitter()<br>            docs = loader.load_and_split(text_splitor)<br>        return docs<br>    def _load_from_url(https://medium.com/self,%20url):<br>        &quot;&quot;&quot;Load data from url address&quot;&quot;&quot;<br>        pass<br>    <br>    def query(self, q):<br>        &quot;&quot;&quot;Query similar doc from Vector &quot;&quot;&quot;<br>        vector_store = self.init_vector_store()<br>        docs = vector_store.similarity_search_with_score(q, k=self.top_k)<br>        for doc in docs:<br>            dc, s = doc<br>            yield s, dc</pre><p>The use of this class is also very simple. First, it is instantiated, and the parameter is only one model_name. It should be noted that the model_name here is a vector model, which is not the same as our previous large model. Of course, it can be the same here. Of course it is also possible. (Question 2: You can think about it, why didn’t we choose LLM to extract vectors here?)</p><p>In fact, there are not many things we do in this class. To sum up, there are only 3 things. 1. Read file (_load_file) 2. Turn vector + persistent storage (init_vector_store) 3. Query (query), the overall code is relatively simple, I will not explain further details here, it is relatively easy to understand.</p><pre># persist_dir = os.path.join(VECTORE_PATH, &quot;.vectordb&quot;) <br># print(persist_dir)<br>k2v = KnownLedge2Vector()<br>for s, dc in k2v.query(&quot;what is oceanbase?&quot;):<br>    print(s, dc.page_content, dc.metadata)</pre><h3>knowledge query</h3><p>Through the above steps, we easily convert knowledge into vectors. Then, next, we will query relevant knowledge based on Query.</p><p>We defined a KnownLedgeBaseQA. This class has only a dozen or so lines of code, so it doesn’t look like much effort. There is only one core method, get_similar_answer. This method only receives a query string. According to this query string, we can query relevant knowledge in the knowledge base we prepared before.</p><pre>class KnownLedgeBaseQA:<br>def __init__(self) -&gt; None:<br>        k2v = KnownLedge2Vector()<br>        self.vector_store = k2v.init_vector_store()<br>        self.llm = VicunaLLM()<br>    <br>    def get_similar_answer(self, query):<br>        <br>        prompt = PromptTemplate(<br>            template=conv_qa_prompt_template,<br>            input_variables=[&quot;context&quot;, &quot;question&quot;]<br>        )<br>        retriever = self.vector_store.as_retriever(search_kwargs={&quot;k&quot;: VECTOR_SEARCH_TOP_K})<br>        docs = retriever.get_relevant_documents(query=query)<br>        context = [d.page_content for d in docs] <br>        result = prompt.format(context=&quot;\n&quot;.join(context), question=query)<br>        return result</pre><h3>Reasoning &amp; QA</h3><p>The knowledge has been checked out, and the rest is left to the big model. We are using the vicuna-13b model here, the specific sample code is as follows,</p><p>Yes, there is nothing difficult here, just construct a parameter, and then send a POST, there is nothing special to talk about.</p><pre>def generate(query):<br>template_name = &quot;conv_one_shot&quot;<br>    state = conv_templates[template_name].copy()<br>    pt = PromptTemplate(<br>        template=conv_qa_prompt_template,<br>        input_variables=[&quot;context&quot;, &quot;question&quot;]<br>    )<br>    result = pt.format(context=&quot;This page covers how to use the Chroma ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Chroma wrappers.&quot;,<br>              question=query)<br>    print(result)<br>    state.append_message(state.roles[0], result)<br>    state.append_message(state.roles[1], None)<br>    prompt = state.get_prompt()<br>    params = {<br>        &quot;model&quot;: &quot;vicuna-13b&quot;,<br>        &quot;prompt&quot;: prompt,<br>        &quot;temperature&quot;: 0.7,<br>        &quot;max_new_tokens&quot;: 1024,<br>        &quot;stop&quot;: &quot;###&quot;<br>    }<br>    response = requests.post(<br>        url=urljoin(VICUNA_MODEL_SERVER, vicuna_stream_path), data=json.dumps(params)<br>    )<br>    skip_echo_len = len(params[&quot;prompt&quot;]) + 1 - params[&quot;prompt&quot;].count(&quot;&lt;/s&gt;&quot;) * 3<br>    for chunk in response.iter_lines(decode_unicode=False, delimiter=b&quot;\0&quot;):<br>        if chunk:<br>            data = json.loads(chunk.decode())<br>            if data[&quot;error_code&quot;] == 0:<br>                output = data[&quot;text&quot;][skip_echo_len:].strip()<br>                state.messages[-1][-1] = output + &quot;▌&quot;<br>                yield(output)</pre><p>Finally, let’s look at the effect of trivia. If you think the effect is good, give us a thumbs up</p><h3>summary</h3><p>To sum up, we have talked about the practical application of the combination of the two leading hands of the current open source mainstream. Vicuna-13B and Langchain do completely different things in the entire AI ecosystem. One is to define the framework to make standards and links, and the other is to go deep into the core to make technologies and effects. Clearly, both paths have been met with major success. I believe that the whole development idea is worth learning from. Through the introduction of this article, I hope it can be of some help to everyone.</p><p>Finally, if you think the content in this tutorial is helpful to you, and want to continue to pay attention to our project, please help to like our project on GitHub ❤️ . Project address: <a href="https://github.com/csunny/DB-GPT">https://github.com/csunny/DB-GPT</a></p><p>Of course, as you can see at the beginning, this is only a small part of our project, and this will also be a series of tutorials. If you care about our projects or are interested in our work, please continue to follow us.</p><h3>References</h3><ul><li><a href="https://link.zhihu.com/?target=https%3A//huggingface.co/">https://huggingface.co/</a></li><li><a href="https://link.zhihu.com/?target=https%3A//github.com/lm-sys/FastChat">https://github.com/lm-sys/FastChat</a></li><li><a href="https://link.zhihu.com/?target=https%3A//python.langchain.com/en/latest/index.html">https://python.langchain.com/en/latest/index.html</a></li><li><a href="https://link.zhihu.com/?target=https%3A//github.com/THUDM/ChatGLM-6B">https://github.com/THUDM/ChatGLM-6B</a></li><li><a href="https://link.zhihu.com/?target=https%3A//www.oceanbase.com/docs/oceanbase-database-cn">https://www.oceanbase.com/docs/oceanbase-database-cn</a></li><li><a href="https://link.zhihu.com/?target=https%3A//github.com/UKPLab/sentence-transformers">https://github.com/UKPLab/sentence-transformers</a></li><li><a href="https://link.zhihu.com/?target=https%3A//arxiv.org/abs/1810.04805">https://arxiv.org/abs/1810.0480</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=701cd0413c9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>