jslin09 commited on
Commit
50da52f
·
verified ·
1 Parent(s): ce29dc2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -38
README.md CHANGED
@@ -16,10 +16,45 @@ widget:
16
  <!-- Provide a quick summary of what the model is/does. -->
17
 
18
  本模型基於 [Gemma2:2b](https://huggingface.co/google/gemma-2-2b) 進行微調,目的是讓其依據台灣刑法學中常用的「刑法三階理論」,針對大型語言模型生成的詐欺罪「犯罪事實」段落,依照詐欺罪法條所規定的構成要件進行標註。具備生成詐欺罪「犯罪事實」的模型,可以參考以 BLOOM 560M 為基礎的[BLOOM 560M Fraud](https://huggingface.co/jslin09/bloom-560m-finetuned-fraud)微調模型,或是以 Gemma2 為基礎的[Gemma2:2b Fraud](https://huggingface.co/jslin09/gemma2-2b-fraud)微調模型。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  目前可以識別出來的標註標籤有以下七種具名實體,無法識別出來的構成要件要素具名實體,則會傳回 None。
20
 
21
  <pre>
22
- <code>
23
  from colorama import Fore, Back, Style
24
 
25
  elements = {'LEO_SOC': ('犯罪主體', 'Subject of Crime'),
@@ -38,7 +73,7 @@ tag_color = {'LEO_SOC': Fore.BLACK + Back.RED,
38
  'LEO_ROH': Fore.BLACK + Back.BLUE,
39
  'LEO_ATP': Fore.WHITE + Back.BLACK,
40
  }
41
- </code>
42
  </pre>
43
 
44
  為了要將本模型標註出來的結果以更明顯的方式識別,可以參考以下的程式碼,將本大型語言模型生成的標註結果以及所標註的標籤,同時送入以下的函數,就可以將結果以 colorama 的方式著色標註。
@@ -89,42 +124,6 @@ def tag_in_color(response_content, tag):
89
  </code>
90
  </pre>
91
 
92
- ## Model Details
93
-
94
- ### Model Description
95
-
96
- <!-- Provide a longer summary of what this model is. -->
97
- 本模型目前在識別出詐欺罪犯罪事實構成要件要素的平均準確率(percision)及召回率(recall)分別為0.98及0.75。從本模型訓練初期的語料資料錄為 979 筆開始,採用強化學習的流程,將生成的標註資料,採用人工對齊的方式修正後再投入語料庫中進行訓練。最終訓練用的語料計有 2577 筆,經過微調 3 個回合,就完成了本模型。以下是訓練過程各代的準確率及召回率的變化。
98
-
99
- |版次|資料量|準確率|召回率|
100
- |---|---|---|---|
101
- |v1|979|0.272727273|0.218623482|
102
- |v2|1538|0.725888325|0.581300813|
103
- |v3|1886|0.717277487|0.465986395|
104
- |v4|2173|0.826086957|0.550724638|
105
- |v5|2577|0.983606557|0.75|
106
-
107
-
108
- - **Developed by:** [Chun-Hsien Lin](https://huggingface.co/jslin09)
109
- - **Funded by [optional]:** [More Information Needed]
110
- - **Shared by [optional]:** [More Information Needed]
111
- - **Model type:** [More Information Needed]
112
- - **Language(s) (NLP):** Traditional Chinese
113
- - **License:** [More Information Needed]
114
- - **Finetuned from model [optional]:** [Gemma2-2b](https://huggingface.co/google/gemma-2-2b)
115
-
116
- ### Model Sources [optional]
117
-
118
- <!-- Provide the basic links for the model. -->
119
-
120
- - **Repository:** [More Information Needed]
121
- - **Paper [optional]:** [More Information Needed]
122
- - **Demo [optional]:** [More Information Needed]
123
-
124
- ## Uses
125
-
126
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
127
-
128
  ### Direct Use
129
 
130
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
@@ -140,6 +139,7 @@ def tag_in_color(response_content, tag):
140
  ### Out-of-Scope Use
141
 
142
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
143
 
144
  [More Information Needed]
145
 
 
16
  <!-- Provide a quick summary of what the model is/does. -->
17
 
18
  本模型基於 [Gemma2:2b](https://huggingface.co/google/gemma-2-2b) 進行微調,目的是讓其依據台灣刑法學中常用的「刑法三階理論」,針對大型語言模型生成的詐欺罪「犯罪事實」段落,依照詐欺罪法條所規定的構成要件進行標註。具備生成詐欺罪「犯罪事實」的模型,可以參考以 BLOOM 560M 為基礎的[BLOOM 560M Fraud](https://huggingface.co/jslin09/bloom-560m-finetuned-fraud)微調模型,或是以 Gemma2 為基礎的[Gemma2:2b Fraud](https://huggingface.co/jslin09/gemma2-2b-fraud)微調模型。
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+
24
+ <!-- Provide a longer summary of what this model is. -->
25
+ 本模型目前在識別出詐欺罪犯罪事實構成要件要素的平均準確率(percision)及召回率(recall)分別為0.98及0.75。從本模型訓練初期的語料資料錄為 979 筆開始,採用強化學習的流程,將生成的標註資料,採用人工對齊的方式修正後再投入語料庫中進行訓練。最終訓練用的語料計有 2577 筆,經過微調 3 個回合,就完成了本模型。以下是訓練過程各代的準確率及召回率的變化。
26
+
27
+ |版次|資料量|準確率|召回率|
28
+ |---|---|---|---|
29
+ |v1|979|0.272727273|0.218623482|
30
+ |v2|1538|0.725888325|0.581300813|
31
+ |v3|1886|0.717277487|0.465986395|
32
+ |v4|2173|0.826086957|0.550724638|
33
+ |v5|2577|0.983606557|0.75|
34
+
35
+ - **Developed by:** [Chun-Hsien Lin](https://huggingface.co/jslin09)
36
+ - **Funded by [optional]:** [More Information Needed]
37
+ - **Shared by [optional]:** [More Information Needed]
38
+ - **Model type:** [More Information Needed]
39
+ - **Language(s) (NLP):** Traditional Chinese
40
+ - **License:** [More Information Needed]
41
+ - **Finetuned from model [optional]:** [Gemma2-2b](https://huggingface.co/google/gemma-2-2b)
42
+
43
+ ### Model Sources [optional]
44
+
45
+ <!-- Provide the basic links for the model. -->
46
+
47
+ - **Repository:** [More Information Needed]
48
+ - **Paper [optional]:** [More Information Needed]
49
+ - **Demo [optional]:** [More Information Needed]
50
+
51
+ ## Uses
52
+
53
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
54
  目前可以識別出來的標註標籤有以下七種具名實體,無法識別出來的構成要件要素具名實體,則會傳回 None。
55
 
56
  <pre>
57
+ <code>
58
  from colorama import Fore, Back, Style
59
 
60
  elements = {'LEO_SOC': ('犯罪主體', 'Subject of Crime'),
 
73
  'LEO_ROH': Fore.BLACK + Back.BLUE,
74
  'LEO_ATP': Fore.WHITE + Back.BLACK,
75
  }
76
+ </code>
77
  </pre>
78
 
79
  為了要將本模型標註出來的結果以更明顯的方式識別,可以參考以下的程式碼,將本大型語言模型生成的標註結果以及所標註的標籤,同時送入以下的函數,就可以將結果以 colorama 的方式著色標註。
 
124
  </code>
125
  </pre>
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  ### Direct Use
128
 
129
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
139
  ### Out-of-Scope Use
140
 
141
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
142
+ 本模型目前僅能標示依據中���民國刑法規定的「詐欺罪」所擬撰(或是語言模型生成)之「犯罪事實」中的構成要件要素,若要具備標註其餘各種不同的犯罪構成要件要素之標註能力,則是後續可以發展以及擴增語料庫的方向。
143
 
144
  [More Information Needed]
145