Instructions to use AbdulElahGwaith/transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbdulElahGwaith/transformers with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbdulElahGwaith/transformers", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download docs/source/en/internal/modeling_utils.md from AbdulElahGwaith/transformers: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docs/source/en/internal/modeling_utils.md
- Command line
-
hf download hf://AbdulElahGwaith/transformers/docs/source/en/internal/modeling_utils.md
-
curl -L -o modeling_utils.md https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docs/source/en/internal/modeling_utils.md
1.7 kB
Custom Layers and Utilities
This page lists all the custom layers used by the library, as well as the utility functions and classes it provides for modeling.
Most of those are only useful if you are studying the code of the models in the library.
WeightConverter
[[autodoc]] WeightConverter
Conversion operations
[[autodoc]] ConversionOps
[[autodoc]] Chunk
[[autodoc]] Concatenate
[[autodoc]] MergeModulelist
[[autodoc]] SplitModulelist
[[autodoc]] PermuteForRope
Layers
[[autodoc]] GradientCheckpointingLayer
Attention Functions
[[autodoc]] AttentionInterface - register
Attention Mask Functions
[[autodoc]] AttentionMaskInterface - register
Rotary Position Embedding Functions
[[autodoc]] dynamic_rope_update
Pytorch custom modules
[[autodoc]] pytorch_utils.Conv1D
PyTorch Helper Functions
[[autodoc]] pytorch_utils.apply_chunking_to_forward
[[autodoc]] pytorch_utils.prune_linear_layer