Downloads · 30 days
3K
18% of all-time downloads
liuyanyi/AlignScore-large-hf
AlignScore-large-hf is a text classification model from liuyanyi. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This is a convert version for AlignScore Model, it can inference without alignscore package.
Downloads · 30 days
3K
18% of all-time downloads
All-time downloads
17K
Public
Parameters
355M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
This is a convert version for AlignScore Model, it can inference without alignscore package.
First download the inference.py, this is a copied code from original codebase.
inference sample
from inferencer import Inferencer
inferencer = Inferencer(
"/model/AlignScore-large-hf/", # <-- Path to the model
device="cuda:0", # Use "cpu" if you don't have a GPU
)
inferencer.nlg_eval_mode = "nli_sp" # Set the evaluation mode
score = inferencer.score(["hello world."], ["hello world."])
print(score) # Output the score