Description

This is a classification model fine-tuned from meta-llama/Llama-3.1-8B-Instruct. It classifies English input sentences into one of four categories: News, Social, Speech, and Literary.

Training data: WMT2024 testset

Example

import transformers
import torch

model_id = "Systran/Llama-3.1-8B-Instruct-ft-wmt25-classifier"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are a language expert."},
    {
        "role": "user",
        "content": "Classify the following English sentence into one of the following categories based on its content and style:\nNews: Factual reporting or informative text typically found in journalism.\nSocial: Informal, conversational, or casual text often used on social media or in personal messages.\nSpeech: Spoken or scripted verbal communication, such as political speeches, interviews, or lectures.\nLiterary: Creative or artistic writing, including fiction, poetry, or other literary works.\n\nSentence: What is hip hop?\n\nYour task: Identify the most appropriate category from the four above. Just respond with the category name: News, Social, Speech, or Literary.",
    },
]

outputs = pipeline(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Downloads last month
8
Safetensors
Model size
8.03B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Systran/Llama-3.1-8B-Instruct-ft-wmt25-classifier

Finetuned
(1747)
this model

Collection including Systran/Llama-3.1-8B-Instruct-ft-wmt25-classifier