Update README.md
Browse files
README.md
CHANGED
@@ -1,204 +1,118 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
tags:
|
4 |
-
-
|
|
|
|
|
|
|
|
|
5 |
datasets:
|
6 |
- ncls-p/blog-key-points
|
7 |
-
|
8 |
-
|
9 |
---
|
10 |
|
11 |
-
#
|
12 |
|
13 |
-
|
14 |
|
|
|
15 |
|
|
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
- **Developed by:** [More Information Needed]
|
26 |
-
- **Funded by [optional]:** [More Information Needed]
|
27 |
-
- **Shared by [optional]:** [More Information Needed]
|
28 |
-
- **Model type:** [More Information Needed]
|
29 |
-
- **Language(s) (NLP):** [More Information Needed]
|
30 |
-
- **License:** [More Information Needed]
|
31 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
32 |
-
|
33 |
-
### Model Sources [optional]
|
34 |
-
|
35 |
-
<!-- Provide the basic links for the model. -->
|
36 |
-
|
37 |
-
- **Repository:** [More Information Needed]
|
38 |
-
- **Paper [optional]:** [More Information Needed]
|
39 |
-
- **Demo [optional]:** [More Information Needed]
|
40 |
|
41 |
## Uses
|
42 |
|
43 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
44 |
-
|
45 |
### Direct Use
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
[More Information Needed]
|
50 |
-
|
51 |
-
### Downstream Use [optional]
|
52 |
-
|
53 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
54 |
-
|
55 |
-
[More Information Needed]
|
56 |
-
|
57 |
-
### Out-of-Scope Use
|
58 |
-
|
59 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
60 |
-
|
61 |
-
[More Information Needed]
|
62 |
-
|
63 |
-
## Bias, Risks, and Limitations
|
64 |
-
|
65 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
66 |
|
67 |
-
|
|
|
|
|
|
|
68 |
|
69 |
-
###
|
70 |
|
71 |
-
|
|
|
72 |
|
73 |
-
|
|
|
|
|
74 |
|
75 |
-
|
|
|
|
|
76 |
|
77 |
-
|
|
|
78 |
|
79 |
-
|
|
|
80 |
|
81 |
-
|
|
|
|
|
82 |
|
83 |
-
|
|
|
84 |
|
85 |
-
|
86 |
|
87 |
-
[
|
88 |
|
89 |
### Training Procedure
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
101 |
-
|
102 |
-
#### Speeds, Sizes, Times [optional]
|
103 |
-
|
104 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
105 |
-
|
106 |
-
[More Information Needed]
|
107 |
|
108 |
## Evaluation
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
### Testing Data, Factors & Metrics
|
113 |
-
|
114 |
-
#### Testing Data
|
115 |
-
|
116 |
-
<!-- This should link to a Dataset Card if possible. -->
|
117 |
-
|
118 |
-
[More Information Needed]
|
119 |
-
|
120 |
-
#### Factors
|
121 |
-
|
122 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
123 |
-
|
124 |
-
[More Information Needed]
|
125 |
-
|
126 |
-
#### Metrics
|
127 |
-
|
128 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
129 |
-
|
130 |
-
[More Information Needed]
|
131 |
-
|
132 |
-
### Results
|
133 |
-
|
134 |
-
[More Information Needed]
|
135 |
-
|
136 |
-
#### Summary
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
## Model Examination [optional]
|
141 |
-
|
142 |
-
<!-- Relevant interpretability work for the model goes here -->
|
143 |
-
|
144 |
-
[More Information Needed]
|
145 |
-
|
146 |
-
## Environmental Impact
|
147 |
-
|
148 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
149 |
-
|
150 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
151 |
-
|
152 |
-
- **Hardware Type:** [More Information Needed]
|
153 |
-
- **Hours used:** [More Information Needed]
|
154 |
-
- **Cloud Provider:** [More Information Needed]
|
155 |
-
- **Compute Region:** [More Information Needed]
|
156 |
-
- **Carbon Emitted:** [More Information Needed]
|
157 |
-
|
158 |
-
## Technical Specifications [optional]
|
159 |
-
|
160 |
-
### Model Architecture and Objective
|
161 |
-
|
162 |
-
[More Information Needed]
|
163 |
-
|
164 |
-
### Compute Infrastructure
|
165 |
-
|
166 |
-
[More Information Needed]
|
167 |
-
|
168 |
-
#### Hardware
|
169 |
-
|
170 |
-
[More Information Needed]
|
171 |
-
|
172 |
-
#### Software
|
173 |
-
|
174 |
-
[More Information Needed]
|
175 |
-
|
176 |
-
## Citation [optional]
|
177 |
-
|
178 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
179 |
-
|
180 |
-
**BibTeX:**
|
181 |
-
|
182 |
-
[More Information Needed]
|
183 |
-
|
184 |
-
**APA:**
|
185 |
-
|
186 |
-
[More Information Needed]
|
187 |
-
|
188 |
-
## Glossary [optional]
|
189 |
|
190 |
-
|
|
|
|
|
191 |
|
192 |
-
|
193 |
|
194 |
-
|
|
|
|
|
|
|
195 |
|
196 |
-
|
197 |
|
198 |
-
|
199 |
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
-
##
|
203 |
|
204 |
-
[
|
|
|
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-3B-Instruct
|
14 |
---
|
15 |
|
16 |
+
# Qwen2.5-3B-blog-key-points
|
17 |
|
18 |
+
This model is fine-tuned from [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-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-3B-blog-key-points** is a 3B 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.
|
23 |
|
24 |
+
### Model Details
|
25 |
|
26 |
+
- **Model Type:** Qwen2.5 (3B parameters)
|
27 |
+
- **Base Model:** [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-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 |
|
44 |
+
### Example Usage
|
45 |
|
46 |
+
```python
|
47 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
48 |
|
49 |
+
model_id = "ncls-p/Qwen2.5-3B-blog-key-points"
|
50 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
51 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
52 |
|
53 |
+
article = """
|
54 |
+
[Your article text here]
|
55 |
+
"""
|
56 |
|
57 |
+
prompt = f"""
|
58 |
+
Extract the key points from the following article:
|
59 |
|
60 |
+
{article}
|
61 |
+
"""
|
62 |
|
63 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
64 |
+
outputs = model.generate(**inputs, max_length=1024)
|
65 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
66 |
|
67 |
+
print(response)
|
68 |
+
```
|
69 |
|
70 |
+
## Training
|
71 |
|
72 |
+
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.
|
73 |
|
74 |
### Training Procedure
|
75 |
|
76 |
+
- **Fine-tuning Framework:** [Unsloth](https://github.com/unslothai/unsloth)
|
77 |
+
- **Training Data Format:**
|
78 |
+
```json
|
79 |
+
{
|
80 |
+
"instruction": "",
|
81 |
+
"input": "Full article content",
|
82 |
+
"output": "Here are the key points of the article:\n* Key point 1\n* Key point 2\n* Key point 3\n..."
|
83 |
+
}
|
84 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
## Evaluation
|
87 |
|
88 |
+
The model was evaluated on its ability to extract relevant key points from articles not seen during training. Evaluation metrics focused on:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
1. **Relevance:** How well the extracted points capture the main ideas of the article
|
91 |
+
2. **Conciseness:** The ability to summarize information in a clear, bullet-point format
|
92 |
+
3. **Completeness:** Whether all important information is captured in the summary
|
93 |
|
94 |
+
## Limitations and Biases
|
95 |
|
96 |
+
- The model may inherit biases present in the training data, including potential biases in the source articles or in the key point extraction process.
|
97 |
+
- Performance may vary depending on the length, complexity, and domain of the input article.
|
98 |
+
- The model is primarily trained on English-language content and may not perform well on content in other languages.
|
99 |
+
- As with any summarization model, there is a risk of omitting important information or misrepresenting the original content.
|
100 |
|
101 |
+
## How to Cite
|
102 |
|
103 |
+
If you use this model in your research, please cite:
|
104 |
|
105 |
+
```bibtex
|
106 |
+
@misc{qwen25-3b-blog-key-points,
|
107 |
+
author = {ncls-p},
|
108 |
+
title = {Qwen2.5-3B-blog-key-points},
|
109 |
+
year = {2024},
|
110 |
+
publisher = {Hugging Face},
|
111 |
+
journal = {Hugging Face model repository},
|
112 |
+
howpublished = {\url{https://huggingface.co/ncls-p/Qwen2.5-3B-blog-key-points}},
|
113 |
+
}
|
114 |
+
```
|
115 |
|
116 |
+
## Dataset Creation
|
117 |
|
118 |
+
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.
|