Downloads · 30 days
5
14% of all-time downloads
mrinaldi/prova001
prova001 is a machine learning model from mrinaldi. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Downloads · 30 days
5
14% of all-time downloads
All-time downloads
37
Public
Parameters
142M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.ckpt1.3 GB · 82%
How the weights are stored.
BF16142M · 100%
From the Hugging Face model README
Trained using Matformer.
pip install git+https://github.com/mrinaldi97/matformer.git
import torch
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"mrinaldi/prova001",
trust_remote_code=True
)
prompt = "The transformer model is a"
inputs = model.matformer_model.tokenizer.encode(prompt, add_bos=True, add_eos=False)
inputs = torch.tensor([inputs], device="cuda")
with torch.no_grad():
outputs = model.generate(inputs, max_new_tokens=50)
decoded = model.matformer_model.tokenizer.decode(outputs[0].tolist())
print(decoded)