Comments (8)
@yhyu13 you can refer to this re-implementation based on HF https://github.com/ChrisLiu6/transformers/tree/llama-adapter
from llama-adapter.
same, want create the merge weith version and share on HF
from llama-adapter.
@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 @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.
@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.
@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.
@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.
@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)
- Not able to reproduce results of llama-adapter-v2 HOT 1
- How to fine-tune the llama-adapter-v2 for llama-2 7b models. HOT 1
- I have problem with downloading 7B_chinese in imagebind_LLM. HOT 1
- The true weight file not find? HOT 4
- Could you please provide these weight with me? HOT 2
- Unable to produce the result between LLaMA-Adapter V1 and Alpaca HOT 1
- question about Pretrained LLAMA applicable to Llama_adapter model. thanks HOT 1
- I don't know which data to use to reproduce the model llama-adapter-multimodal-v2.
- Does storage space in the paper mean the capacity of checkpoint file? HOT 2
- Inquiry on Loading LLaMa-2 Model Parameters HOT 1
- how to set llama adapter max_seq_len = 4096
- [LLaMA Adapter V2] Evaluation on multiple choice questions. HOT 1
- AssertionError: Loading a checkpoint for MP=0 but world size is 1 HOT 2
- Don't find save path"ADAPTER_PATH" HOT 1
- Getting error "AF_UNIX path too long"
- Loss is nan, stopping training, while trying to reproduce alpaca_finetuning_v1 results. HOT 1
- Simple question about llama adapter v1 transformer forward function
- imagebind_LLM中的get_chinese_llama.py文件丢失,可以补充一下吗? HOT 1
- Getting weird output for multimodal 7B adapter HOT 3
- Assertation Error start_pos- AdapterV2 Multimodal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llama-adapter.