ランキングに戻る

yuanzhoulvpi2017/zero_nlp

Jupyter Notebook

中文nlp解决方案(大模型、数据、模型、训练、推理)

bertnlptransformersgpt2chatglm-6bclipgptpytorchtext-generationhuggingface-transformersllama2llama
スター成長
スター
3.8k
フォーク
443
週間成長
Issue
102
1k2k3k
2023年2月2024年3月2025年5月2026年7月
README

zero to nlp

特点

  1. 🎯目标:基于pytorchtransformers做中文领域的nlp开箱即用的训练框架,提供全套的训练、微调模型(包括大模型、文本转向量、文本生成、多模态等模型)的解决方案;
  2. 💽数据
    • 从开源社区,整理了海量的训练数据,帮助用户可以快速上手;
    • 同时也开放训练数据模版,可以快速处理垂直领域数据;
    • 结合多线程、内存映射等更高效的数据处理方式,即使需要处理百GB规模的数据,也是轻而易举;
  3. 💻流程:每一个项目有完整的模型训练步骤,如:数据清洗、数据处理、模型构建、模型训练、模型部署、模型图解;
  4. 🔥模型:当前已经支持gpt2clipgpt-neoxdollyllamachatglm-6bVisionEncoderDecoderModel等多模态大模型;
  5. 🚀多卡串联 :当前,多数的大模型的尺寸已经远远大于单个消费级显卡的显存,需要将多个显卡串联,才能训练大模型、才能部署大模型。因此对部分模型结构进行修改,实现了训练时推理时 的多卡串联功能。
  6. ⚙️模型工具:添加了大模型的词表裁切词表扩充 教程model_modify

目录

模型训练

中文名称 文件夹名称 数据 数据清洗 大模型 模型部署 图解
中文文本分类 chinese_classifier
中文gpt2 chinese_gpt2
中文clip chinese_clip
图像生成中文文本 VisionEncoderDecoderModel
vit核心源码介绍 vit model
Thu-ChatGlm-6b(v1版本 作废) simple_thu_chatglm6b
🌟chatglm-v2-6b🎉 chatglm_v2_6b_lora
中文dolly_v2_3b dolly_v2_3b
中文llama(作废) chinese_llama
中文bloom chinese_bloom
中文falcon(注意:falcon模型和bloom结构类似) chinese_bloom
中文预训练代码 model_clm
百川大模型 model_baichuan
模型修剪✂️ model_modify
llama2 流水线并行 pipeline
百川2-7b-chat的dpo DPO baichuan2-7b-chat
训练时候,数据占比发生变化 train_data_sample
internlm-base sft internlm-sft
train qwen2 train_qwen2
train llava train_llava

工程介绍 debug vllm

  1. 介绍如何debug vllm,对vllm工程上了解的更加透彻 debug vllm
数据流程图解

我一直觉得,数据流程通过图解的形式表达出来,其实是最清楚的,因此我都会尽可能的把每一个任务的都图解出来。

文本分类数据图解

中文gpt2

中文clip

model

图像生成中文文本

model

vit 源码

分享transformers源码解读

一直在做transformers的源码解读,可以去B站查看视频👉良睦路程序员

関連リポジトリ
datawhalechina/leedl-tutorial

《李宏毅深度学习教程》(李宏毅老师推荐👍,苹果书🍎),PDF下载地址:https://github.com/datawhalechina/leedl-tutorial/releases

Jupyter NotebookOthermachine-learningdeep-learning
16.7k3.1k
graykode/nlp-tutorial

Natural Language Processing Tutorial for Deep Learning Researchers

Jupyter NotebookMIT Licensenlpnatural-language-processing
reddit.com/r/MachineLearning/comments/amfinl/project_nlptutoral_repository_who_is_studying/
14.9k3.9k
PaddlePaddle/PaddleNLP

Easy-to-use and powerful LLM and SLM library with awesome model zoo.

PythonPyPIApache License 2.0nlpembedding
paddlenlp.readthedocs.io
13k3k
jina-ai/clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP

PythonPyPIOtherbertsentence-encoding
clip-as-service.jina.ai
12.8k2.1k
NielsRogge/Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.

Jupyter NotebookMIT Licensetransformerspytorch
11.7k1.7k
huggingface/tokenizers

💥 Fast State-of-the-Art Tokenizers optimized for Research and Production

Rustcrates.ioApache License 2.0nlpnatural-language-processing
huggingface.co/docs/tokenizers
10.9k1.2k
ymcui/Chinese-BERT-wwm

Pre-Training with Whole Word Masking for Chinese BERT(中文BERT-wwm系列模型)

PythonPyPIApache License 2.0chinese-berttensorflow
ieeexplore.ieee.org/document/9599397
10.2k1.4k
brightmart/nlp_chinese_corpus

大规模中文自然语言处理语料 Large Scale Chinese Corpus for NLP

MIT Licensechinese-datasetchinese-corpus
9.9k1.6k
fishaudio/Bert-VITS2

vits2 backbone with multilingual-bert

PythonPyPIGNU Affero General Public License v3.0bertbert-vits2
8.8k1.3k
jessevig/bertviz

BertViz: Visualize Attention in Transformer Models

PythonPyPIApache License 2.0natural-language-processingmachine-learning
8.1k886
MaartenGr/BERTopic

Leveraging BERT and c-TF-IDF to create easily interpretable topics.

PythonPyPIMIT Licenseberttransformers
maartengr.github.io/BERTopic/
7.7k909
codertimo/BERT-pytorch

Google AI 2018 BERT pytorch implementation

PythonPyPIApache License 2.0berttransformer
6.5k1.3k