Instructions to use Drjkedwards/Recursive-Transformer-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Drjkedwards/Recursive-Transformer-Model with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Drjkedwards/Recursive-Transformer-Model", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| # Run this once on your machine to generate the weight files | |
| import torch | |
| from modeling_recursive_transformer import RecursiveTransformerConfig, RecursiveTransformerModel | |
| config = RecursiveTransformerConfig() | |
| model = RecursiveTransformerModel(config) | |
| # Add a couple of example memory blocks | |
| model.add_memory("Paris is the capital of France") | |
| model.add_memory("The Eiffel Tower is in Paris") | |
| # Save everything | |
| model.save_pretrained("./") | |
| print("✅ pytorch_model.bin and memory_state.json created!") |