Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,121 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
datasets:
|
3 |
- ncls-p/blog-key-points
|
4 |
-
|
5 |
-
|
6 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- qwen2
|
6 |
+
- text-generation
|
7 |
+
- summarization
|
8 |
+
- key-points
|
9 |
+
- blog-summarization
|
10 |
datasets:
|
11 |
- ncls-p/blog-key-points
|
12 |
+
license: cc-by-4.0
|
13 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
14 |
+
---
|
15 |
+
|
16 |
+
# Qwen2.5-7B-blog-key-points
|
17 |
+
|
18 |
+
This model is fine-tuned from [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the [blog-key-points dataset](https://huggingface.co/datasets/ncls-p/blog-key-points). It specializes in extracting key points from blog articles and web content, providing concise bullet-point summaries that capture the essential information.
|
19 |
+
|
20 |
+
## Model Description
|
21 |
+
|
22 |
+
**Qwen2.5-7B-blog-key-points** is a 7B parameter model fine-tuned specifically for the task of extracting key points from articles. It can process a full article and generate a concise, bullet-point summary highlighting the most important information. Compared to the 3B version, this model offers enhanced capabilities for understanding complex articles and generating more nuanced summaries.
|
23 |
+
|
24 |
+
### Model Details
|
25 |
+
|
26 |
+
- **Model Type:** Qwen2.5 (7B parameters)
|
27 |
+
- **Base Model:** [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
28 |
+
- **Training Dataset:** [ncls-p/blog-key-points](https://huggingface.co/datasets/ncls-p/blog-key-points)
|
29 |
+
- **Language:** English
|
30 |
+
- **License:** [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)
|
31 |
+
- **Finetuning Approach:** Instruction fine-tuning on article-summary pairs
|
32 |
+
|
33 |
+
## Uses
|
34 |
+
|
35 |
+
### Direct Use
|
36 |
+
|
37 |
+
This model is designed for extracting key points from articles. You can use it directly for:
|
38 |
+
|
39 |
+
- Summarizing blog posts
|
40 |
+
- Extracting important information from news articles
|
41 |
+
- Creating bullet-point summaries of long-form content
|
42 |
+
- Generating concise overviews of research papers
|
43 |
+
- Distilling complex information into digestible points
|
44 |
+
|
45 |
+
### Example Usage
|
46 |
+
|
47 |
+
```python
|
48 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
49 |
+
|
50 |
+
model_id = "ncls-p/Qwen2.5-7B-blog-key-points"
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
52 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
53 |
+
|
54 |
+
article = """
|
55 |
+
[Your article text here]
|
56 |
+
"""
|
57 |
+
|
58 |
+
prompt = f"""
|
59 |
+
Extract the key points from the following article:
|
60 |
+
|
61 |
+
{article}
|
62 |
+
"""
|
63 |
+
|
64 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
65 |
+
outputs = model.generate(**inputs, max_length=1024)
|
66 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
67 |
+
|
68 |
+
print(response)
|
69 |
+
```
|
70 |
+
|
71 |
+
## Training
|
72 |
+
|
73 |
+
The model was fine-tuned on the [blog-key-points dataset](https://huggingface.co/datasets/ncls-p/blog-key-points), which contains 200 article-summary pairs. Each pair consists of a full article and a bullet-point summary of key points extracted using Perplexity AI.
|
74 |
+
|
75 |
+
### Training Procedure
|
76 |
+
|
77 |
+
- **Fine-tuning Framework:** [Unsloth](https://github.com/unslothai/unsloth)
|
78 |
+
- **Training Data Format:**
|
79 |
+
```json
|
80 |
+
{
|
81 |
+
"instruction": "",
|
82 |
+
"input": "Full article content",
|
83 |
+
"output": "Here are the key points of the article:\n* Key point 1\n* Key point 2\n* Key point 3\n..."
|
84 |
+
}
|
85 |
+
```
|
86 |
+
|
87 |
+
## Evaluation
|
88 |
+
|
89 |
+
The model was evaluated on its ability to extract relevant key points from articles not seen during training. Evaluation metrics focused on:
|
90 |
+
|
91 |
+
1. **Relevance:** How well the extracted points capture the main ideas of the article
|
92 |
+
2. **Conciseness:** The ability to summarize information in a clear, bullet-point format
|
93 |
+
3. **Completeness:** Whether all important information is captured in the summary
|
94 |
+
4. **Coherence:** The logical flow and organization of the extracted points
|
95 |
+
|
96 |
+
## Limitations and Biases
|
97 |
+
|
98 |
+
- The model may inherit biases present in the training data, including potential biases in the source articles or in the key point extraction process.
|
99 |
+
- Performance may vary depending on the length, complexity, and domain of the input article.
|
100 |
+
- The model is primarily trained on English-language content and may not perform well on content in other languages.
|
101 |
+
- As with any summarization model, there is a risk of omitting important information or misrepresenting the original content.
|
102 |
+
- While the 7B parameter size offers improved capabilities over the 3B version, it also requires more computational resources to run.
|
103 |
+
|
104 |
+
## How to Cite
|
105 |
+
|
106 |
+
If you use this model in your research, please cite:
|
107 |
+
|
108 |
+
```bibtex
|
109 |
+
@misc{qwen25-7b-blog-key-points,
|
110 |
+
author = {ncls-p},
|
111 |
+
title = {Qwen2.5-7B-blog-key-points},
|
112 |
+
year = {2024},
|
113 |
+
publisher = {Hugging Face},
|
114 |
+
journal = {Hugging Face model repository},
|
115 |
+
howpublished = {\url{https://huggingface.co/ncls-p/Qwen2.5-7B-blog-key-points}},
|
116 |
+
}
|
117 |
+
```
|
118 |
+
|
119 |
+
## Dataset Creation
|
120 |
+
|
121 |
+
The dataset used to train this model was created using the [Dataset Enhancer with Perplexity AI](https://github.com/ncls-p/pplx-to-dataset), a CLI tool that extracts key points from web articles using Perplexity AI's API and adds them to a dataset in a structured format.
|