Comments (2)
There is no guide on that.
My recommendation to your specific question about adding a new LoRA layer type: Search through the code base for existing layers, like lora.Embedding
, and follow the same steps. In particular, add your class to tuners/lora/layer.py
, inherit from LoraLayer
, and implement the __init__
, update_layer
and forward
methods. If you want merging support, add merge
and unmerge
. Finally, edit the dispatch_default
function so that the correct layer type is replaced by your new layer.
You can check out #1324, which adds a new LoRA layer type, for inspiration. If your addition is useful for the wider community, you can also create a draft PR here and we can help you along the way.
from peft.
Thank you for your reply, I will try it.
from peft.
Related Issues (20)
- Loading trained peft model results in random adapter weights each time HOT 4
- Example for Prompt-based methods fails with `expected sequence of length` mismatch
- Add Support for IA3 Adapters in add_weighted_adapter Method, Currently facing issue that 'IA3Model' object has no attribute 'add_weighted_adapter' HOT 9
- Saved weights differ from the original model HOT 14
- DoRA uses lots of GPU VRAM due to fp32 upcasting HOT 6
- How to convert a loha safetensor trained from diffusers to webui format HOT 1
- Add Support for IA3 Adapters in add_weighted_adapter Method HOT 5
- Outdated utility function: No attribute get_module_class_from_name in FullyShardedDataParallelPlugin HOT 1
- Error while loading PEFT lora model HOT 4
- The FSDP example fails to run with "ValueError: Must flatten tensors with uniform requires_grad when use_orig_params=False" HOT 2
- OOM error while QLoRA+Deepspeed fine tuning of Llama3-70B model on 4xA100-40GB gpus HOT 2
- Support merge_and_unload for IA3 Adapters with 4-bit and 8bit Quantization models
- model merge_and_unload do not support layer_replication HOT 5
- OOM with Phi-3-mini (3.8B) on 83.5GB RAM due to LoftQ HOT 4
- Ignore keys for modules to save HOT 1
- PeftModel failing to load after finetuning. Size Mismatch Error HOT 2
- Can peft support ColumnParallelLinear? HOT 1
- how to finetune whisper model with 'initial_prompt' HOT 3
- eval_loss showing Nan but train_loss decreases and goes to NaN after couple of steps while fine tuning gemma model with additional vocab HOT 1
- GPU Allocation Issue (QLoRa + Llama3-8B-IT) HOT 1
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 peft.