Instructions to use mrinaldi/albertina-micro-crazy-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrinaldi/albertina-micro-crazy-model with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mrinaldi/albertina-micro-crazy-model", 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, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"mrinaldi/albertina-micro-crazy-model",
trust_remote_code=True
)
tokenizer=AutoTokenizer.from_pretrained(model.config._tokenizer_name)
text = "The transformer model is a"
inputs = tokenizer(text,return_tensors='pt')['input_ids'].to(model.device)
with torch.no_grad():
outputs = model.generate(inputs, max_new_tokens=50)
generated = model.matformer_model.tokenizer.decode(outputs[0].tolist())
print(generated)
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support