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 examples/modular-transformers/modular_test_suffix.py from AbdulElahGwaith/transformers: direct link, hf CLI and curl.
- Browser
- Download file 313 Bytes
-
https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/examples/modular-transformers/modular_test_suffix.py
- Command line
-
hf download hf://AbdulElahGwaith/transformers/examples/modular-transformers/modular_test_suffix.py
-
curl -L -o modular_test_suffix.py https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/examples/modular-transformers/modular_test_suffix.py
313 Bytes
| import torch.nn as nn | |
| from transformers.models.llama.modeling_llama import LlamaDecoderLayer | |
| class TestSuffixDecoderLayer(nn.module): | |
| pass | |
| # Here, we want to add "Llama" as a suffix to the base `TestModel` name for all required dependencies | |
| class TestSuffixLlamaDecoderLayer(LlamaDecoderLayer): | |
| pass | |