Giter VIP home page Giter VIP logo

Comments (8)

aojunzz avatar aojunzz commented on May 28, 2024 1

@yhyu13 you can refer to this re-implementation based on HF https://github.com/ChrisLiu6/transformers/tree/llama-adapter

from llama-adapter.

yhyu13 avatar yhyu13 commented on May 28, 2024

same, want create the merge weith version and share on HF

from llama-adapter.

aojunzz avatar aojunzz commented on May 28, 2024

@LiuPearl1 @yhyu13 do you want to merge the adapter weights to the original llama models (similar to lora) or extract the adapter weights?

from llama-adapter.

LiuPearl1 avatar LiuPearl1 commented on May 28, 2024

@LiuPearl1 @yhyu13 do you want to merge the adapter weights to the original llama models (similar to lora) or extract the adapter weights?

Both two ways is ok to me.

from llama-adapter.

aojunzz avatar aojunzz commented on May 28, 2024

@LiuPearl1 for v1, you can use https://github.com/ZrrSkywalker/LLaMA-Adapter/blob/main/alpaca_finetuning_v1/extract_adapter_from_checkpoint.py to extract the adapter, the adapter weight cannot merge into the llama backbone.

from llama-adapter.

yhyu13 avatar yhyu13 commented on May 28, 2024

@aojunzz I want to merge the adapter weights to the original llama models, does it produce hf transformer format of weights?

By doing so, I can then create a GPTQ 4bit quant using GPTQ-for-LLAMA, and deploy to my textgen-webui instance for testing on a home rig

from llama-adapter.

BabyChouSr avatar BabyChouSr commented on May 28, 2024

@yhyu13 The weights cannot be merged into the original weights since we are injecting "soft prompts" into the input, so we are not performing a reparameterization like LoRA. This article explains more in detail! If you want a method that can be merged, I would recommend LoRA.

from llama-adapter.

yhyu13 avatar yhyu13 commented on May 28, 2024

@BabyChouSr Thanks for clarifying the difference between llama adapater and lora. But my purpose of merging weights is to apply quantitation methods (like GPTQ and more) on a frozen weight that is ready for inference. I am not sure I understand how to perform model compression if I cannot settle on a frozen model. What are the recommended methods for model compression on llama adapted models?

from llama-adapter.

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.