Downloads · 30 days
3
20% of all-time downloads
garetht/identity-transformer
identity-transformer is a machine learning model from garetht. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A lightweight transformer implementation designed for testing tensor shapes and experimenting with transformer architecture.
Downloads · 30 days
3
20% of all-time downloads
All-time downloads
15
Public
Repo size
8.8 KB
Likes
0
Public
Click a slice to open those files.
.bin8.8 KB · 74%
From the Hugging Face model README
A lightweight transformer implementation designed for testing tensor shapes and experimenting with transformer architecture.
This model implements a minimal transformer that maintains input-output identity. It's useful for:
from transformers import AutoTokenizer, AutoModel
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("garetht/byte-tokenizer")
model = AutoModel.from_pretrained("garetht/identity-transformer")
# Encode text
text = "Hello, world!"
inputs = tokenizer(text, return_tensors="pt")
# Forward pass
outputs = model(**inputs)
# Process outputs
# outputs.last_hidden_state contains the hidden states
This project is open source and available under the MIT License.