Git Product home page Git Product logo

chatglm-chinese-insturct's Introduction

ChatGLM-chinese-insturct

探索中文instruct数据在ChatGLM, LLaMA等LLM上微调表现,结合PEFT等方法降低资源需求。

大部分基于ChatGLM-6BChatGLM-TuningAplaca-LoRA,感谢大佬们。

时间线 / Time line

  • [2023-03-28] 完成在中文instruction数据上使用Lora对LLaMA-7B进行微调,发布了微调后的权重
  • [2023-03-24] 完成在中文instruction数据上使用Lora对ChatGLM-6B进行微调,发布了微调后的权重

样例展示 / Some Examples

LLaMa-7B

在中文上的效果不如ChatGLM-6B,但考虑其对中文的支持本来就不好,已经不错了(不知道有没有大佬可以尝试增强一下LLaMa的中文能力已经有了Chinese-LLaMA-Alpaca

截屏2023-03-28 10 31 06

截屏2023-03-28 10 52 00

ChatGLM-6B

截屏2023-03-24 15 54 06

环境准备 / Preparing the Enviroment

conda env create -f env.yml -n bab
conda activate bab
pip install git+https://github.com/huggingface/peft.git

数据处理 / Processing the Data

Run bash dataprocess.sh to process the data.

模型微调 / Finetune Your Model

ChatGLM-6B

Run bash finetune.sh to finetune the model.

LLaMA-7B

Run python test_llama1.py to finetune the model.

模型推理 / Inference with Your Model

You can also choose to interact with the model through the annotation section.

ChatGLM-6B

Run python infer.py to do the inference. Show cases in the dataset by default.

LLaMA-7B

Run python generate_llama1.py to do the inference. Show cases in the dataset by default.

友情链接

  • kanchil: 一个探索小模型的潜力的开源项目

chatglm-chinese-insturct's People

Contributors

27182812 avatar vxfla avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.