Comments (5)
I've yet to use the library - just looked at the documentation. Could be something along the lines of:
peft_config = LoraConfig(
task_type=TaskType.SEQ_2_SEQ_LM, inference_mode=True, r=8, lora_alpha=32, lora_dropout=0.1
)
model = ORTModelForSeq2SeqLM.from_pretrained(model_name_or_path)
model = get_peft_model(model, peft_config)
Note the inference mode=True
. If I read the paper right I believe this should calculate W' = W0 + BA -- updating the weights such that it behaves as a normal transformer of size W0.
from peft.
Hello @PetroMaslov, For using ONNX with PEFT LoRA model, please refer to the example in the PR #118. Let us know if that solves the issue.
from peft.
@pacman100
great, thank you very much.
I checked that for me onnx (flan-t5-large) is faster than deepspeed. Does it so or I do something wrong?
from peft.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
from peft.
@PetroMaslov after converting the LoRA finetuned T5-large model to ONNX, did you see degraded model outputs? Using a bigscience/bloom base model, I can perform inference after exporting to ONNX, but the model predictions become nonsensical 🤔 #670
from peft.
Related Issues (20)
- Inference with different LoRA adapters in the same batch does not use the correct module_to_save classifier HOT 4
- Deprecation: Transformers will no longer support `past_key_values` to be tuples HOT 6
- Training with Multiple LoRAs HOT 4
- Changing lora_alpha during inference HOT 5
- Documentation and optimization of X-LoRA HOT 3
- MobileViT does not work with Inference with different LoRA adapters in the same batch HOT 3
- hyper-paramter `r` in adalora_confg and lora_config HOT 1
- PEFT QLoRA with DeepSpeed ZeRO3 on multiple GPUs not working as in documentation HOT 6
- AttributeError: 'NoneType' object has no attribute 'shape' HOT 14
- Merging adapters for BF16 model on CPU is very slow HOT 1
- LoraConfig.__init__() got an unexpected keyword argument 'layer_replication' when using custom model handler HOT 2
- RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn HOT 1
- LoftQ init without scaling HOT 1
- Gumbel-sigmoid (poly) HOT 2
- DoRA with fsdp model cannot work HOT 14
- TypeError: WhisperForConditionalGeneration.forward() got an unexpected keyword argument 'input_ids' HOT 4
- Linear4bit not supported error when running QDoRA_finetuning.ipynb cookbook HOT 1
- Support optimum-quanto
- Lora initialisation with olora and pissa not working with quantisation. HOT 7
- Issue with PEFT model save_pretrained HOT 5
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.