real-jiakai commited on
Commit
5ae376d
·
verified ·
1 Parent(s): 012e6e5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -66
README.md CHANGED
@@ -1,75 +1,56 @@
1
- ---
2
- library_name: transformers
3
- license: mit
4
- base_model: distilbert-base-uncased
5
- tags:
6
- - question-answering
7
- - distilbert
8
- - squad
9
- - fine-tuning
10
- datasets:
11
- - squad
12
- metrics:
13
- - loss
14
- - exact_match
15
- - f1
16
- model-index:
17
- - name: my_awesome_qa_model
18
- results:
19
- - task:
20
- type: question-answering
21
- name: Question Answering
22
- dataset:
23
- name: SQuAD v1.1
24
- type: squad
25
- split: validation
26
- metrics:
27
- - name: Exact Match
28
- type: exact_match
29
- value: 请在此填写您的 EM 分数
30
- - name: F1 Score
31
- type: f1
32
- value: 请在此填写您的 F1 分数
33
- ---
34
 
35
  # my_awesome_qa_model
36
 
37
- 本模型是 [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) 的微调版本,针对 [SQuAD v1.1 数据集](https://huggingface.co/datasets/squad) 进行了训练。
38
 
39
- 它在验证集上取得了以下结果:
40
 
41
- - **Loss(损失)**: 1.7489
42
 
43
- ## 模型描述
44
-
45
- 该模型基于 DistilBERT,是 BERT 的精简版本,参数更少,速度更快,但性能仍接近原始 BERT。通过在 SQuAD 数据集上微调,模型学习了从给定的上下文中抽取回答问题的能力。
46
-
47
- ## 预期用途与限制
48
-
49
- ### 预期用途
50
-
51
- - **问答系统**:适用于需要从文本中抽取答案的应用,如聊天机器人、信息检索等。
52
- - **教育目的**:演示如何微调预训练模型以执行特定任务。
53
-
54
- ### 限制
55
-
56
- - **语言局限**:模型仅在英文数据上进行训练,对其他语言的支持可能有限。
57
- - **知识截止**:模型的知识截止于其训练数据,无法理解训练后发生的事件。
58
- - **领域适应性**:在特定领域(如医学、法律)可能表现不佳,需要在相关领域数据上进一步微调。
59
-
60
- ## 使用方法
61
 
62
  ```python
63
  from transformers import pipeline
64
 
65
- # 加载模型
66
  question_answerer = pipeline(
67
  "question-answering",
68
  model="real-jiakai/my_awesome_qa_model",
69
  tokenizer="real-jiakai/my_awesome_qa_model"
70
  )
71
 
72
- # 英文示例
73
  context_en = """
74
  Donald Trump was the 45th president of the United States, serving from 2017 to 2021.
75
  """
@@ -80,22 +61,20 @@ result_en = question_answerer(question=question_en, context=context_en)
80
  print("Answer:", result_en['answer'])
81
  ```
82
 
83
- ## 许可证
84
 
85
- 本模型采用 MIT 许可证。
86
 
87
- ## 引用
88
 
89
- 如果您在您的工作中使用了本模型,请引用:
90
 
91
  ```
92
- @misc{real-jiakai2024awesome,
93
- author = {Real-Jiakai},
94
- title = {My Awesome QA Model},
95
  year = {2024},
96
- publisher = {Hugging Face},
97
- howpublished = {Hugging Face Model Repository},
98
  url = {https://huggingface.co/real-jiakai/my_awesome_qa_model},
99
- note = {Accessed: YYYY-MM-DD}
100
  }
101
  ```
 
1
+ ---
2
+ library_name: transformers
3
+ license: mit
4
+ base_model: distilbert-base-uncased
5
+ tags:
6
+ - question-answering
7
+ - distilbert
8
+ - squad
9
+ - fine-tuning
10
+ datasets:
11
+ - squad
12
+ model-index:
13
+ - name: my_awesome_qa_model
14
+ results:
15
+ - task:
16
+ type: question-answering
17
+ name: Question Answering
18
+ dataset:
19
+ name: SQuAD v1.1
20
+ type: squad
21
+ split: validation
22
+ metrics:
23
+ - name: Exact Match
24
+ type: exact_match
25
+ value: Please fill in your EM score
26
+ - name: F1 Score
27
+ type: f1
28
+ value: Please fill in your F1 score
29
+ language:
30
+ - en
31
+ ---
 
 
32
 
33
  # my_awesome_qa_model
34
 
35
+ This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased), trained on the [SQuAD v1.1 dataset](https://huggingface.co/datasets/squad).
36
 
37
+ It achieved the following results on the validation set:
38
 
39
+ - **Loss**: 1.7489
40
 
41
+ ## How to Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  ```python
44
  from transformers import pipeline
45
 
46
+ # Load the model
47
  question_answerer = pipeline(
48
  "question-answering",
49
  model="real-jiakai/my_awesome_qa_model",
50
  tokenizer="real-jiakai/my_awesome_qa_model"
51
  )
52
 
53
+ # English example
54
  context_en = """
55
  Donald Trump was the 45th president of the United States, serving from 2017 to 2021.
56
  """
 
61
  print("Answer:", result_en['answer'])
62
  ```
63
 
64
+ ## License
65
 
66
+ This model is licensed under the [MIT](https://opensource.org/license/mit) License.
67
 
68
+ ## Citation
69
 
70
+ If you use this model in your work, please cite:
71
 
72
  ```
73
+ @misc{my_awesome_qa_model,
74
+ author = {real-jiakai},
75
+ title = {my_awesome_qa_model},
76
  year = {2024},
 
 
77
  url = {https://huggingface.co/real-jiakai/my_awesome_qa_model},
78
+ publisher = {Hugging Face}
79
  }
80
  ```