Downloads · 30 days
16
21% of all-time downloads
aryan14072001/article-writer-rag
article-writer-rag is a text generation model from aryan14072001. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This model is fine-tuned on CNN/DailyMail articles to expand rough bullet-point notes into professional news articles.
Downloads · 30 days
16
21% of all-time downloads
All-time downloads
75
Public
Parameters
1.2B
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This model is fine-tuned on CNN/DailyMail articles to expand rough bullet-point notes into professional news articles.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model
model = AutoModelForCausalLM.from_pretrained(
"aryan14072001/article-writer-rag",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("aryan14072001/article-writer-rag")
# Generate article
messages = [
{"role": "system", "content": "You are a professional journalist."},
{"role": "user", "content": "Write article from:\n\n• Fact 1\n• Fact 2"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3)
article = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(article)
Apache 2.0