BAAI
/

MonteXiaofeng commited on
Commit
a61f0c7
1 Parent(s): f2fd2d4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -3
README.md CHANGED
@@ -1,3 +1,70 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - BAAI/bge-m3
7
+ ---
8
+
9
+ 该模型是数据集[BAAI/IndustryCorpus2](https://huggingface.co/datasets/BAAI/IndustryCorpus2)用于31个行业分类
10
+
11
+ ## 模型细节:
12
+
13
+ 为了提升数据集中行业划分对实际行业的覆盖,并对齐国家标准中定义的行业目录,我们参考国家统计局制定的国民经济行业分类体系和世界知识体系,进行类目的合并和整合,设计了覆盖中英文的最终的31个行业类目。类目表名称如下所示
14
+
15
+ ```
16
+ {
17
+ "数学_统计": {"zh": "数学与统计", "en": "Math & Statistics"},
18
+ "体育": {"zh": "体育", "en": "Sports"},
19
+ "农林牧渔": {"zh": "农业与渔业", "en": "Agriculture & Fisheries"},
20
+ "房地产_建筑": {"zh": "房地产与建筑", "en": "Real Estate & Construction"},
21
+ "时政_政务_行政": {"zh": "政治与行政", "en": "Politics & Administration"},
22
+ "消防安全_食品安全": {"zh": "安全管理", "en": "Safety Management"},
23
+ "石油化工": {"zh": "石油化工", "en": "Petrochemicals"},
24
+ "计算机_通信": {"zh": "计算机与通信", "en": "Computing & Telecommunications"},
25
+ "交通运输": {"zh": "交通运输", "en": "Transportation"},
26
+ "其他": {"zh": "其他", "en": "Others"},
27
+ "医学_健康_心理_中医": {"zh": "健康与医学", "en": "Health & Medicine"},
28
+ "文学_情感": {"zh": "文学与情感", "en": "Literature & Emotions"},
29
+ "水利_海洋": {"zh": "水利与海洋", "en": "Water Resources & Marine"},
30
+ "游戏": {"zh": "游戏", "en": "Gaming"},
31
+ "科技_科学研究": {"zh": "科技与研究", "en": "Technology & Research"},
32
+ "采矿": {"zh": "采矿", "en": "Mining"},
33
+ "人工智能_机器学习": {"zh": "人工智能", "en": "Artificial Intelligence"},
34
+ "其他信息服务_信息安全": {"zh": "信息服务", "en": "Information Services"},
35
+ "学科教育_教育": {"zh": "学科教育", "en": "Subject Education"},
36
+ "新闻传媒": {"zh": "新闻传媒", "en": "Media & Journalism"},
37
+ "汽车": {"zh": "汽车", "en": "Automobiles"},
38
+ "生物医药": {"zh": "生物医药", "en": "Biopharmaceuticals"},
39
+ "航空航天": {"zh": "航空航天", "en": "Aerospace"},
40
+ "金融_经济": {"zh": "金融与经济", "en": "Finance & Economics"},
41
+ "住宿_餐饮_酒店": {"zh": "住宿与餐饮", "en": "Hospitality & Catering"},
42
+ "其他制造": {"zh": "制造业", "en": "Manufacturing"},
43
+ "影视_娱乐": {"zh": "影视与娱乐", "en": "Film & Entertainment"},
44
+ "旅游_地理": {"zh": "旅游与地理", "en": "Travel & Geography"},
45
+ "法律_司法": {"zh": "法律与司法", "en": "Law & Justice"},
46
+ "电力能源": {"zh": "电力与能源", "en": "Power & Energy"},
47
+ "计算机编程_代码": {"zh": "编程", "en": "Programming"},
48
+ }
49
+ ```
50
+
51
+ ## 行业分类模型的数据构造
52
+
53
+ - 数据构建
54
+
55
+ 数据来源:预训练预训练语料抽样和开源文本分类数据,其中预训练语料占比90%,通过数据采样,保证中英文数据占比为1:1
56
+ 标签构造:使用LLM模型对数据进行多次分类判定,筛选多次判定一致的数据作为训练数据
57
+ 数据规模:36K
58
+ 数据构造的整体流程如下:
59
+
60
+ ![image-20240919140307205](./img/classify.png)
61
+
62
+ ## 模型训练:
63
+
64
+ 参数更新:在预训练的bert模型上添加分类头进行文本分类模型训练
65
+
66
+ 模型选型:考虑的模型性能和推理效率,我们选用了0.5b规模的模型,通过对比实验最终最终选择了bge-m3并全参数训练的方式,作为我们的基座模型
67
+
68
+ 训练超参:全参数训练,max_length = 2048,lr=1e-5,batch_size=64,,验证集评估acc:86%
69
+
70
+ ![image-20240919141408659](./img/classify_exp.png)