Code Monkey home page Code Monkey logo

clip_finetuning's Introduction

update information

    2023-04-22 简化
    2023-10-22 initial

install

  • pip install -U -r requirements.txt
  • 如果无法安装, 可以切换官方源 pip install -i https://pypi.org/simple -U -r requirements.txt

weigtht select one is suitable for you

支持且不限于以下权重

data sample

open_data https://github.com/ssbuild/open_data

单条数据示例

p prefix optional
text  must
img   must

{"id": 1, "p": "", "text": "图中是一只拉布拉多犬", "img": "../assets/demo.jpeg"}

infer

# infer_finetuning.py 推理微调模型
# infer_lora_finetuning.py 推理微调模型
# infer_ptuning.py 推理p-tuning-v2微调模型
 python infer_finetuning.py

training

    # 制作数据
    cd scripts
    bash train_full.sh -m dataset 
    or
    bash train_lora.sh -m dataset 
    or
    bash train_ptv2.sh -m dataset 
    
    注: num_process_worker 为多进程制作数据 , 如果数据量较大 , 适当调大至cpu数量
    dataHelper.make_dataset_with_args(data_args.train_file,mixed_data=False, shuffle=True,mode='train',num_process_worker=0)
    
    # 全参数训练 
        bash train_full.sh
        
    # lora adalora ia3 
        bash train_lora.sh
        
    # ptv2
        bash train_ptv2.sh

训练参数

训练参数

友情链接

纯粹而干净的代码

Star History

Star History Chart

clip_finetuning's People

Contributors

ssbuild avatar

Watchers

 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.