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
6
Safetensors
Model size
0.1B params
Tensor type
F32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support