-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs
- Loading branch information
Showing
9 changed files
with
85 additions
and
334 deletions.
There are no files selected for viewing
47 changes: 0 additions & 47 deletions
47
docs/source/guide/explanation/algorithms/action/action_detection.rst
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ Action Recognition | |
|
||
|
||
action_classification | ||
action_detection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/source/guide/tutorials/advanced/low_rank_adaptation.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
LoRA: Low Rank Adaptation for Classification Tasks | ||
=================================================== | ||
|
||
.. note:: | ||
|
||
LoRA is only supported for VisionTransformer models. | ||
See the model in otx.algo.classification.vit. | ||
|
||
Overview | ||
-------- | ||
|
||
OpenVINO™ Training Extensions now supports Low Rank Adaptation (LoRA) for classification tasks using Transformer models. | ||
LoRA is a parameter-efficient approach to adapt pre-trained models by introducing low-rank matrices that capture important adaptations without the need to retrain the entire model. | ||
|
||
Benefits of LoRA | ||
---------------- | ||
|
||
- **Efficiency**: LoRA allows for efficient adaptation of large pre-trained models with minimal additional parameters. | ||
- **Performance**: By focusing on key parameters, LoRA can achieve competitive performance with less computational overhead. | ||
- **Flexibility**: LoRA can be applied to various parts of the transformer model, providing flexibility in model tuning. | ||
|
||
How to Use LoRA in OpenVINO™ Training Extensions | ||
------------------------------------------------ | ||
|
||
.. tab-set:: | ||
|
||
.. tab-item:: API | ||
|
||
.. code-block:: python | ||
from otx.algo.classification.vit import VisionTransformerForMulticlassCls | ||
model = VisionTransformerForMulticlassCls(..., lora=True) | ||
.. tab-item:: CLI | ||
|
||
.. code-block:: bash | ||
(otx) ...$ otx train ... --model.lora True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[BETA] Enable torch.compile | ||
============================ | ||
|
||
.. warning:: | ||
Not currently supported on all models. | ||
As far as we check, it is available for Classification Task models and some segmentation models. | ||
We will continue to optimize this and do not guarantee performance for now. | ||
|
||
Overview | ||
-------- | ||
|
||
OpenVINO™ Training Extensions now integrates the `torch.compile` feature from PyTorch, allowing users to optimize their models for better performance. | ||
This feature compiles the model's operations into optimized lower-level code, which can significantly improve execution speed and reduce memory usage. | ||
|
||
Benefits of torch.compile | ||
------------------------- | ||
|
||
- **Performance Optimization**: Compiled models run faster by executing optimized low-level operations. | ||
- **Reduced Memory Footprint**: Optimized models can use less memory, which is beneficial for deploying models on resource-constrained devices. | ||
For more information on the benefits of `torch.compile`, refer to the official `PyTorch documentation <https://pytorch.org/docs/stable/generated/torch.compile.html>`_. | ||
|
||
How to Use torch.compile in OpenVINO™ Training Extensions | ||
---------------------------------------------------------- | ||
|
||
**Prepare OTXModel**: Ensure that model is compatible with `torch.compile`. When building the model, give the `torch_compile` option `True`. | ||
|
||
.. tab-set:: | ||
|
||
.. tab-item:: API | ||
|
||
.. code-block:: python | ||
from otx.algo.classification.vit import VisionTransformerForMulticlassCls | ||
model = VisionTransformerForMulticlassCls(..., torch_compile=True) | ||
.. tab-item:: CLI | ||
|
||
.. code-block:: bash | ||
(otx) ...$ otx train ... --model.torch_compile True |
Oops, something went wrong.