Instructions to use mrinaldi/prova001 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrinaldi/prova001 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mrinaldi/prova001", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Matformer Model
Trained using Matformer.
Installation
pip install git+https://github.com/mrinaldi97/matformer.git
Usage
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)
- Downloads last month
- 2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mrinaldi/prova001", trust_remote_code=True, dtype="auto")