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