Code Monkey home page Code Monkey logo

Comments (2)

HAOChuzhan avatar HAOChuzhan commented on June 18, 2024 1

可以去仔细看下代码,我的理解是如果create_new_adapter为True,则会在代码中将adapter_name_or_path与基模先merge起来,然后再添加新的adapter进行训练,反之create_new_adapter为False,则是在adapter_name_or_path基础上进一步训练,最后保存优化后的adapter,两种方法的本质效果是一致的,但第一种会产生两个adapter参数,第二种就只有一个adapter参数,不知道我的理解是否正确 : )

from llama-factory.

hecongqing avatar hecongqing commented on June 18, 2024

如果采用第一种方式进行训练的话,最后导出模型的话,是直接和原始的模型进行合并,还是和sft的模型进行合并

#!/bin/bash

DO NOT use quantized model or quantization_bit when merging lora weights

CUDA_VISIBLE_DEVICES=0 python ../../src/export_model.py
--model_name_or_path /mnt/data/legalexp/LLM_exp/MiniCPM/MiniCPM-2B-sft-bf16
--adapter_name_or_path ../../saves/LLaMA2-7B/lora/dpo
--template default
--finetuning_type lora
--export_dir ../../saves/minicpm_dpo
--export_size 2
--export_legacy_format False

from llama-factory.

Related Issues (20)

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.