Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1 |
-
---
|
2 |
-
license: llama3.2
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama3.2
|
3 |
+
base_model: meta-llama/Meta-Llama-3-3B
|
4 |
+
tags:
|
5 |
+
- summarization
|
6 |
+
- news
|
7 |
+
- llama3
|
8 |
+
- fine-tuned
|
9 |
+
- llama3.2
|
10 |
+
---
|
11 |
+
|
12 |
+
# ๐ฐ Automatic News Summarizer (Fine-tuned on LLaMA 3.2 3B)
|
13 |
+
|
14 |
+
This model is a fine-tuned version of **Meta-LLaMA-3-3B**, optimized for **automatic news summarization** tasks. It is designed to generate concise and coherent summaries of news articles using state-of-the-art language modeling techniques.
|
15 |
+
|
16 |
+
## ๐ Model Details
|
17 |
+
|
18 |
+
- **Base model**: [Meta-LLaMA-3-3B](https://huggingface.co/meta-llama/Meta-Llama-3-3B)
|
19 |
+
- **Fine-tuned for**: Summarization
|
20 |
+
- **Architecture**: Decoder-only Transformer (LLaMA 3.2 3B)
|
21 |
+
- **License**: [Meta LLaMA 3 Community License](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
|
22 |
+
|
23 |
+
## ๐ Training
|
24 |
+
|
25 |
+
- Fine-tuned on a dataset of curated news articles and summaries
|
26 |
+
- Optimized for relevance, coherence, and brevity
|
27 |
+
- Training framework: Hugging Face Transformers
|
28 |
+
- Fine-tuning platform: Google Colab
|
29 |
+
|
30 |
+
## ๐ Usage Example
|
31 |
+
|
32 |
+
```python
|
33 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
34 |
+
|
35 |
+
model_name = "punit16/automatic_news_summarizer"
|
36 |
+
|
37 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
38 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
39 |
+
|
40 |
+
input_text = "The government has announced a new policy today aimed at reducing air pollution in major cities..."
|
41 |
+
|
42 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
43 |
+
summary_ids = model.generate(**inputs, max_new_tokens=512)
|
44 |
+
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
45 |
+
|
46 |
+
print("Summary:", summary)
|