自然语言处理(NLP)
Project description
📌 简介
nlhappy致力于复现自然语言处理各类任务的SOTA模型(不包含LLM相关任务)。
文档地址:
它主要的依赖有
- transformers: 下载预训练权重
- pytorch-lightning: 模型训练
- datasets: 构建数据集
- pydantic: 数据校验
📌 支持NLP任务
- 实体抽取
- 嵌套实体抽取
- 非连续实体抽取
- 关系抽取
- 事件抽取
- 文本单标签分类
- 文本多标签分类
- 阅读理解
- 文本对分类
- 文本对相似度(文本向量化)
📌 安装
安装nlhappy
推荐先去pytorch官网安装pytorch和对应cuda
# pip 安装
pip install --upgrade pip
pip install --upgrade nlhappy
其他可选
推荐安装wandb用于可视化训练日志
- 安装:
pip install wandb
- 注册: https://wandb.ai/
- 获取认证: https://wandb.ai/authorize
- 登陆:
wandb login
- 使用
# 命令行训练
nlhappy datamodule=xxx model=xxx trainer=xxx logger=wandb
模型训练开始后去官网查看训练实况
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nlhappy-2024.5.7.tar.gz
(90.4 kB
view hashes)
Built Distribution
nlhappy-2024.5.7-py3-none-any.whl
(155.7 kB
view hashes)
Close
Hashes for nlhappy-2024.5.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72aff368fe6d7fb5ffadeff4650b88f7941b7967b9ca24fc36356481d5ae2410 |
|
MD5 | c48693bd497a2fa0171f1ea372b134d8 |
|
BLAKE2b-256 | 838392867138113bdf53720bc6d91f2dd27143f3a01abbd897d2cc3625de8055 |