Base Model: https://huggingface.co/meta-llama/Llama-2-7b-chat-hf


Model fine-tuned on a real news dataset and optimized for neural news generation.

Note: Turkish was not in pretraining.

from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
model = AutoModelForSequenceClassification.from_pretrained('tum-nlp/neural-news-llama-2-7b-chat-tr')

# Create the pipeline for neural news generation and set the repetition penalty >1.1 to punish repetition.
generator = pipeline('text-generation',
                      model=model,
                      tokenizer=tokenizer,
                      repetition_penalty=1.2)

# Define the prompt
prompt = "Başlık: Madde madde Türkiye, İsveç'in NATO mutabakatı Metin: Türkiye, İsveç ve NATO'nun Litvanya'nın başkenti Vilnius'ta mutabakatla biten üçlü görüşmesi [EOP]"

# Generate
generator(prompt, max_length=1000, num_return_sequences=1)

Trained on 6k datapoints (including all splits) from: https://huggingface.co/datasets/batubayk/TR-News/tree/main

Downloads last month
15
Safetensors
Model size
6.74B params
Tensor type
FP16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Collection including tum-nlp/neural-news-generator-llama-2-7b-chat-tr