GithubHelp home page GithubHelp logo

xiaoyichao / chatglm-deepspeed-lora Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liucongg/chatglm-finetuning

5.0 0.0 0.0 72.94 MB

基于ChatGLM-6B模型,进行下游具体任务微调,涉及Freeze、Lora、P-tuning等

Python 99.79% Shell 0.21%

chatglm-deepspeed-lora's Introduction

使用Deepspeed 在ChatGLM上基于LoRA方法的微调

LoRA参数已经在项目的output/0503-speed/global_step-24414文件夹**享。 对比效果

image

生成requirements.txt

pipreqs ./     --force

安装环境

pip install -r requirements.txt

如何安装peft==0.3.0.dev0

pip install peft==0.3.0.dev0 -i https://pypi.tuna.tsinghua.edu.cn/simple
或者
pip install peft==0.3.0.dev0 -i git+https://ghproxy.com/https://github.com/huggingface/peft.git

如何安装mpi4py

conda install --channel https://conda.anaconda.org/dhirschfeld mpi4py

如何运行程序

CUDA_VISIBLE_DEVICES=0 deepspeed finetuning_lora_sft.py --num_train_epochs 2 --train_batch_size 2 --lora_r 8  && shutdown now
或者 
nohup bash run_glm_6b_SFT.sh  && shutdown now > nohup.out 2>&1 &
或者
nohup bash run_glm_6b_SFT.sh  > nohup.out 2>&1 &

web_demo 修改./output/0504-speed/global_step-122070文件夹中adapter_config.json 参数 "inference_mode"为false

python web_demo_lora.py

如何查看程序是否还在运行

ps -ef|grep web_demo_lora.py
ps -ef|grep finetuning_lora_sft.py

数据集来源

https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM

Reference

非常感谢以下作者的无私开源

chatglm-deepspeed-lora's People

Contributors

liucongg avatar xiaoyichao avatar zhishanq avatar

Stargazers

 avatar  avatar  avatar  avatar  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.