BAAI / IndustryCorpus2_Classifier

huggingface.co
Total runs: 33
24-hour runs: 0
7-day runs: 5
30-day runs: 9
Model's Last Updated: October 09 2024

Introduction of IndustryCorpus2_Classifier

Model Details of IndustryCorpus2_Classifier

该模型是数据集 BAAI/IndustryCorpus2 用于31个行业分类

模型细节:

为了提升数据集中行业划分对实际行业的覆盖,并对齐国家标准中定义的行业目录,我们参考国家统计局制定的国民经济行业分类体系和世界知识体系,进行类目的合并和整合,设计了覆盖中英文的最终的31个行业类目。类目表名称如下所示

{
    "数学_统计": {"zh": "数学与统计", "en": "Math & Statistics"},
    "体育": {"zh": "体育", "en": "Sports"},
    "农林牧渔": {"zh": "农业与渔业", "en": "Agriculture & Fisheries"},
    "房地产_建筑": {"zh": "房地产与建筑", "en": "Real Estate & Construction"},
    "时政_政务_行政": {"zh": "政治与行政", "en": "Politics & Administration"},
    "消防安全_食品安全": {"zh": "安全管理", "en": "Safety Management"},
    "石油化工": {"zh": "石油化工", "en": "Petrochemicals"},
    "计算机_通信": {"zh": "计算机与通信", "en": "Computing & Telecommunications"},
    "交通运输": {"zh": "交通运输", "en": "Transportation"},
    "其他": {"zh": "其他", "en": "Others"},
    "医学_健康_心理_中医": {"zh": "健康与医学", "en": "Health & Medicine"},
    "文学_情感": {"zh": "文学与情感", "en": "Literature & Emotions"},
    "水利_海洋": {"zh": "水利与海洋", "en": "Water Resources & Marine"},
    "游戏": {"zh": "游戏", "en": "Gaming"},
    "科技_科学研究": {"zh": "科技与研究", "en": "Technology & Research"},
    "采矿": {"zh": "采矿", "en": "Mining"},
    "人工智能_机器学习": {"zh": "人工智能", "en": "Artificial Intelligence"},
    "其他信息服务_信息安全": {"zh": "信息服务", "en": "Information Services"},
    "学科教育_教育": {"zh": "学科教育", "en": "Subject Education"},
    "新闻传媒": {"zh": "新闻传媒", "en": "Media & Journalism"},
    "汽车": {"zh": "汽车", "en": "Automobiles"},
    "生物医药": {"zh": "生物医药", "en": "Biopharmaceuticals"},
    "航空航天": {"zh": "航空航天", "en": "Aerospace"},
    "金融_经济": {"zh": "金融与经济", "en": "Finance & Economics"},
    "住宿_餐饮_酒店": {"zh": "住宿与餐饮", "en": "Hospitality & Catering"},
    "其他制造": {"zh": "制造业", "en": "Manufacturing"},
    "影视_娱乐": {"zh": "影视与娱乐", "en": "Film & Entertainment"},
    "旅游_地理": {"zh": "旅游与地理", "en": "Travel & Geography"},
    "法律_司法": {"zh": "法律与司法", "en": "Law & Justice"},
    "电力能源": {"zh": "电力与能源", "en": "Power & Energy"},
    "计算机编程_代码": {"zh": "编程", "en": "Programming"},
}
行业分类模型的数据构造
  • 数据构建

    数据来源:预训练预训练语料抽样和开源文本分类数据,其中预训练语料占比90%,通过数据采样,保证中英文数据占比为1:1 标签构造:使用LLM模型对数据进行多次分类判定,筛选多次判定一致的数据作为训练数据 数据规模:36K

数据构造的整体流程如下:

image-20240919140307205

模型训练:

参数更新:在预训练的bert模型上添加分类头进行文本分类模型训练

模型选型:考虑的模型性能和推理效率,我们选用了0.5b规模的模型,通过对比实验最终最终选择了bge-m3并全参数训练的方式,作为我们的基座模型

训练超参:全参数训练,max_length = 2048,lr=1e-5,batch_size=64,,验证集评估acc:86%

image-20240919141408659

how to use
from transformers import (
    AutoConfig,
    AutoModelForSequenceClassification,
    AutoTokenizer)
import torch

model_dir = "BAAI/IndustryCorpus2_Classifier"

model = AutoModelForSequenceClassification.from_pretrained(
      model_dir,
      trust_remote_code=False,
      ignore_mismatched_sizes=False,
).half().cuda().eval()

tokenizer = AutoTokenizer.from_pretrained(
    model_dir,
    use_fast=True,
    token=None,
    trust_remote_code=False,
)

config = AutoConfig.from_pretrained(
    model_dir,
    finetuning_task="text-classification",
)

id2label = config.id2label
print(id2label)
label2id = config.label2id
print(label2id)


sentence = "黄龙国际中心位于杭州市西湖区学院路77号,地处杭州黄龙商务区核心位置。项目以“新经济、新生态、新黄龙”的理念和“知识城市创新区”的项目定位,引领着杭州城市的产业升级和创新。\n黄龙国际中心主打“知识盒子”建筑设计,拥有时尚、新潮的建筑立面,聚集不同功能的独立建筑物,打造出包容开放又具有链接性的空间。项目在2018年4月一举斩获开发项目行业最高奖——广厦奖。\n项目整体分四期开发。一期G、H、I三幢楼宇由坤和自主开发建成,于2015年4月投入使用,于2015年5月获得了美国绿色建筑委员会颁发的LEED金级认证,并成功吸引蚂蚁金服、美图、有赞等国内互联网创新巨头率先入驻。\n2016年初,坤和引进万科作为该项目股权合作方通过双方优质资源共享,在产品品质、创新等方面得到全方位提升。\n二期A、B幢由美国KPF设计,并于2018年4月一举获得房地产开发项目行业最高奖——广厦奖。A、B幢写字楼于2018年10月投入使用,B幢与全球领先的创造者社区及空间和服务提供商——WeWork正式签约。商业K-lab于2018年12月28日正式开业。\n项目三期E、F幢已于2020年投入使用。四期C、D幢,计划于2021年底投入使用。\n项目总占地面积约8.7万方,总建筑面积约40万平方米,涵盖9栋国际5A写字楼及8万方K-lab商业新物种,以知识为纽带,打造成一个集商务、商业、教育、文化、娱乐、艺术、餐饮、会展等于一体的完整城市性生态体系。项目全部投入使用后,年租金收入将超6亿元。\n"

result = tokenizer(
            [sentecnce],
            padding=False,
            max_length=2048,
            truncation=True,
            return_tensors="pt",
        ).to("cuda")
result["input_ids"].to(dtype=torch.bfloat16)

model_out = model(**result)
predict_label_id = torch.argmax(model_out.logits, dim=-1).tolist()[0]
predict_label_str = id2label[predict_label_id]

Runs of BAAI IndustryCorpus2_Classifier on huggingface.co

33
Total runs
0
24-hour runs
0
3-day runs
5
7-day runs
9
30-day runs

More Information About IndustryCorpus2_Classifier huggingface.co Model

More IndustryCorpus2_Classifier license Visit here:

https://choosealicense.com/licenses/apache-2.0

IndustryCorpus2_Classifier huggingface.co

IndustryCorpus2_Classifier huggingface.co is an AI model on huggingface.co that provides IndustryCorpus2_Classifier's model effect (), which can be used instantly with this BAAI IndustryCorpus2_Classifier model. huggingface.co supports a free trial of the IndustryCorpus2_Classifier model, and also provides paid use of the IndustryCorpus2_Classifier. Support call IndustryCorpus2_Classifier model through api, including Node.js, Python, http.

IndustryCorpus2_Classifier huggingface.co Url

https://huggingface.co/BAAI/IndustryCorpus2_Classifier

BAAI IndustryCorpus2_Classifier online free

IndustryCorpus2_Classifier huggingface.co is an online trial and call api platform, which integrates IndustryCorpus2_Classifier's modeling effects, including api services, and provides a free online trial of IndustryCorpus2_Classifier, you can try IndustryCorpus2_Classifier online for free by clicking the link below.

BAAI IndustryCorpus2_Classifier online free url in huggingface.co:

https://huggingface.co/BAAI/IndustryCorpus2_Classifier

IndustryCorpus2_Classifier install

IndustryCorpus2_Classifier is an open source model from GitHub that offers a free installation service, and any user can find IndustryCorpus2_Classifier on GitHub to install. At the same time, huggingface.co provides the effect of IndustryCorpus2_Classifier install, users can directly use IndustryCorpus2_Classifier installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

IndustryCorpus2_Classifier install url in huggingface.co:

https://huggingface.co/BAAI/IndustryCorpus2_Classifier

Url of IndustryCorpus2_Classifier

IndustryCorpus2_Classifier huggingface.co Url

Provider of IndustryCorpus2_Classifier huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 4.9M
Run Growth: 238.0K
Growth Rate: 4.70%
Updated: February 22 2024
huggingface.co

Total runs: 2.2M
Run Growth: -1.6M
Growth Rate: -70.83%
Updated: February 21 2024
huggingface.co

Total runs: 2.2M
Run Growth: 34.0K
Growth Rate: 1.57%
Updated: July 03 2024
huggingface.co

Total runs: 1.6M
Run Growth: -95.3K
Growth Rate: -5.87%
Updated: February 21 2024
huggingface.co

Total runs: 922.5K
Run Growth: -114.0K
Growth Rate: -12.20%
Updated: June 24 2024
huggingface.co

Total runs: 810.2K
Run Growth: 362.4K
Growth Rate: 43.54%
Updated: April 02 2024
huggingface.co

Total runs: 702.1K
Run Growth: -7.5K
Growth Rate: -1.05%
Updated: December 13 2023
huggingface.co

Total runs: 579.5K
Run Growth: 156.4K
Growth Rate: 27.02%
Updated: October 12 2023
huggingface.co

Total runs: 137.4K
Run Growth: 15.6K
Growth Rate: 11.29%
Updated: October 12 2023
huggingface.co

Total runs: 122.8K
Run Growth: -63.0K
Growth Rate: -49.63%
Updated: November 14 2023
huggingface.co

Total runs: 77.4K
Run Growth: 21.6K
Growth Rate: 28.71%
Updated: April 17 2024
huggingface.co

Total runs: 22.1K
Run Growth: 18.0K
Growth Rate: 66.40%
Updated: October 12 2023
huggingface.co

Total runs: 21.0K
Run Growth: -1.5K
Growth Rate: -7.30%
Updated: January 15 2025
huggingface.co

Total runs: 11.7K
Run Growth: -17.9K
Growth Rate: -126.21%
Updated: October 12 2023
huggingface.co

Total runs: 6.3K
Run Growth: -530
Growth Rate: -8.38%
Updated: December 26 2022
huggingface.co

Total runs: 5.8K
Run Growth: 1.9K
Growth Rate: 32.81%
Updated: September 21 2023
huggingface.co

Total runs: 5.7K
Run Growth: 2.0K
Growth Rate: 30.79%
Updated: February 22 2024
huggingface.co

Total runs: 5.6K
Run Growth: 1.4K
Growth Rate: 25.86%
Updated: August 15 2024
huggingface.co

Total runs: 3.9K
Run Growth: 1.1K
Growth Rate: 27.68%
Updated: October 12 2023
huggingface.co

Total runs: 3.0K
Run Growth: 1.2K
Growth Rate: 40.86%
Updated: August 15 2024
huggingface.co

Total runs: 2.0K
Run Growth: -1.2K
Growth Rate: -55.97%
Updated: October 23 2024
huggingface.co

Total runs: 2.0K
Run Growth: 282
Growth Rate: 18.50%
Updated: October 23 2024
huggingface.co

Total runs: 1.9K
Run Growth: 220
Growth Rate: 10.80%
Updated: February 07 2024
huggingface.co

Total runs: 1.6K
Run Growth: -13
Growth Rate: -0.76%
Updated: September 18 2023
huggingface.co

Total runs: 1.3K
Run Growth: -650
Growth Rate: -48.51%
Updated: November 28 2024
huggingface.co

Total runs: 1.2K
Run Growth: 429
Growth Rate: 34.10%
Updated: October 24 2024
huggingface.co

Total runs: 974
Run Growth: 854
Growth Rate: 84.98%
Updated: April 02 2024
huggingface.co

Total runs: 766
Run Growth: 614
Growth Rate: 78.82%
Updated: January 15 2025
huggingface.co

Total runs: 690
Run Growth: 409
Growth Rate: 57.85%
Updated: October 27 2023
huggingface.co

Total runs: 645
Run Growth: 372
Growth Rate: 56.79%
Updated: March 07 2024
huggingface.co

Total runs: 626
Run Growth: 524
Growth Rate: 92.25%
Updated: April 19 2024
huggingface.co

Total runs: 483
Run Growth: -285
Growth Rate: -59.62%
Updated: June 07 2024
huggingface.co

Total runs: 402
Run Growth: 349
Growth Rate: 83.89%
Updated: January 14 2025
huggingface.co

Total runs: 343
Run Growth: 214
Growth Rate: 67.08%
Updated: June 24 2024
huggingface.co

Total runs: 289
Run Growth: 245
Growth Rate: 84.19%
Updated: January 01 2025
huggingface.co

Total runs: 273
Run Growth: 394
Growth Rate: 99.24%
Updated: April 18 2023
huggingface.co

Total runs: 248
Run Growth: 16
Growth Rate: 7.08%
Updated: August 15 2024
huggingface.co

Total runs: 204
Run Growth: 102
Growth Rate: 56.67%
Updated: December 21 2023
huggingface.co

Total runs: 146
Run Growth: -121
Growth Rate: -82.88%
Updated: June 24 2024
huggingface.co

Total runs: 122
Run Growth: -140
Growth Rate: -116.67%
Updated: October 28 2023
huggingface.co

Total runs: 116
Run Growth: 74
Growth Rate: 62.71%
Updated: August 23 2023
huggingface.co

Total runs: 103
Run Growth: 41
Growth Rate: 46.59%
Updated: August 23 2023
huggingface.co

Total runs: 102
Run Growth: -14
Growth Rate: -17.07%
Updated: August 15 2024
huggingface.co

Total runs: 94
Run Growth: 74
Growth Rate: 78.72%
Updated: December 31 2022
huggingface.co

Total runs: 71
Run Growth: -13
Growth Rate: -19.12%
Updated: December 21 2023
huggingface.co

Total runs: 55
Run Growth: -107
Growth Rate: -187.72%
Updated: June 21 2024
huggingface.co

Total runs: 42
Run Growth: 99
Growth Rate: 86.09%
Updated: January 20 2025
huggingface.co

Total runs: 41
Run Growth: -13
Growth Rate: -32.50%
Updated: August 15 2024
huggingface.co

Total runs: 32
Run Growth: -6
Growth Rate: -18.75%
Updated: August 28 2024
huggingface.co

Total runs: 30
Run Growth: 7
Growth Rate: 24.14%
Updated: July 24 2023
huggingface.co

Total runs: 29
Run Growth: 17
Growth Rate: 58.62%
Updated: July 05 2024
huggingface.co

Total runs: 29
Run Growth: -22
Growth Rate: -75.86%
Updated: February 07 2024
huggingface.co

Total runs: 26
Run Growth: 1
Growth Rate: 3.85%
Updated: December 25 2023
huggingface.co

Total runs: 26
Run Growth: 22
Growth Rate: 100.00%
Updated: February 11 2025