Downloads · 30 days
14
4% of all-time downloads
Yuto2007/tx-model-standalone
tx-model-standalone is a feature extraction model from Yuto2007. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
14
4% of all-time downloads
All-time downloads
322
Public
Parameters
71M
568 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors284 MB · 99%
From the Hugging Face model README
Zero-hassle deployment! Requires ONLY:
pip install transformers torch safetensors
from transformers import AutoModel
import torch
# Load from Hub (one command!)
model = AutoModel.from_pretrained(
"your-username/model-name",
trust_remote_code=True
)
# Use immediately
genes = torch.randint(0, 100, (2, 10))
values = torch.rand(2, 10)
masks = torch.ones(2, 10).bool()
model.eval()
with torch.no_grad():
output = model(genes=genes, values=values, gen_masks=masks)
print(output.last_hidden_state.shape) # [2, 10, d_model]
modeling.pypip install transformers torch safetensors
That's it!
from transformers import AutoModel
model = AutoModel.from_pretrained(
"your-username/model-name",
trust_remote_code=True
)
# Move to GPU if available
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)
# Your data
batch = {
'genes': torch.randint(0, 1000, (32, 100)),
'values': torch.rand(32, 100),
'masks': torch.ones(32, 100).bool()
}
# Process
model.eval()
with torch.no_grad():
output = model(**batch)
@article{tahoe2024,
title={Tahoe-x1},
author={...},
year={2024}
}