Run this model with HF Jobs

Run lucadiliello/bleurt-tiny-128 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/lucadiliello/bleurt-tiny-128. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/lucadiliello/bleurt-tiny-128 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

This model is based on a custom Transformer model that can be installed with:

pip install git+https://github.com/lucadiliello/bleurt-pytorch.git

Now load the model and make predictions with:

import torch
from bleurt_pytorch import BleurtConfig, BleurtForSequenceClassification, BleurtTokenizer

config = BleurtConfig.from_pretrained('lucadiliello/bleurt-tiny-128')
model = BleurtForSequenceClassification.from_pretrained('lucadiliello/bleurt-tiny-128')
tokenizer = BleurtTokenizer.from_pretrained('lucadiliello/bleurt-tiny-128')

references = ["a bird chirps by the window", "this is a random sentence"]
candidates = ["a bird chirps by the window", "this looks like a random sentence"]

model.eval()
with torch.no_grad():
    inputs = tokenizer(references, candidates, padding='longest', return_tensors='pt')
    res = model(**inputs).logits.flatten().tolist()
print(res)
# [0.7669461369514465, 0.6060263514518738]

Take a look at this repository for the definition of BleurtConfig, BleurtForSequenceClassification and BleurtTokenizer in PyTorch.

Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support