:speaking_head: [ 中文 | English ]
Knowledgeable Large Language Model Framework
KnowLM is a knowledgeable Large Language Model (LLM) framework, including data processing, model pre-training, fine-tuning, augmentation and utilization with knowledge. Additionally, KnowLM provides a model zoo featuring readily accessible models like ZhiXi and OneKE, tailored for immediate implementation.
- ❗Please note that this project is still undergoing optimization and developemnt, and the model weights will be regularly updated to support new features and models!
- ❗If you are interested in information extraction/knowledge extraction, please refer to the DeepKE. KnowLM is a framework for knowledgeable Large Language Model!
Features
- A standard framework for LLM pre-training and fine-tuning.
- A model zoo including ZhiXi, KnowLM-IE, OneKE, and OceanGPT, along with open-source data.
- A instruction processing module based on EasyInstruct.
- A knowlege augmentation module based on RAG (under development).
- A hallucination detection module for based on EasyDetect.
- A knowlege editing module based on EasyEdit.
- Model inference and deployment.
All weights and datasets have been uploaded to HuggingFace🤗. Click here to get started right away!
❗If you encounter any issues during the installation or use of KnowLM, please check FAQ or promptly submit an issue, and we will assist you with resolving the problem!
| Instruction Dataset Name |
Number |
Download Link |
Note |
| KnowLM-CR (CoT&Reasoning, Chinese and English) |
202,333 |
Google Drive HuggingFace |
|
| KnowLM-Tool (Tool Learning,English) |
38,241 |
Google Drive HuggingFace |
|
| OceanBench (Benchmark,English) |
11,000 |
HuggingFace |
|
| InstructIE (Information Extraction, Chinese and English) |
364, 076 |
HuggingFace WiseModel ModelScope |
Due to using distant supervision, there exists noise. |
| IEPile (Information Extraction, Chinese and English) |
2,000,000 + |
HuggingFace WiseModel ModelScope |
It is constructed based on 33 exsiting IE datasets. |
Data description: 1. Other data sources for information extraction come from CoNLL, ACE, casis, DuEE, People Daily, DuIE, etc. 2. The KnowLM-Tool dataset comes from the paper "Making Language Models Better Tool Learners with Execution Feedback" and the gitHub can be found here. 3. The InstructIE dataset comes from the paper "InstructIE: A Chinese Instruction-based Information Extraction Dataset" and the gitHub can be found here.
📬 NEWS
📍 Technologies in KnowLM
This is an overview of the KnowLM, which mainly consists of three technical features:
Knowledge Prompting: It generates knowledge prompts based on structured data such as knowledge graphs and utilizes knowledge augmentation constraints to address knowledge extraction and reasoning issues.
Knowledge Editing: It aligns outdated, incorrect, and biased knowledge within large models using knowledge editing techniques to tackle knowledge fallacy problems (English Tutorial).
Knowledge Interaction: It enables dynamic knowledge interaction and feedback to achieve tool-based learning and multi-agent collaboration, resolving the problem of embodiment cognition in LLMs (English Tutorial).
The modules related to these three technologies are EasyInstruct, EasyDetect, EasyEdit. We provide use cases for those modules based on the KnowLMframework.
🗂️ Contents
All Thanks To Our Contributors :
🚴1. Quick Start
🛠️1.1 Environment Configuration
KnowLM supports both manual and docker image environment configuration, you can choose the appropriate way to build.
🔧Manual Environment Configuration
git clone https://github.com/zjunlp/KnowLM.git
cd KnowLM
conda create -n knowlm python=3.9 -y
conda activate knowlm
pip install torch==1.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
pip install -r requirements.txt
🐳Building With Docker Images