Paddle2.x version AI-Writer

Overview

Paddle2.x 版本AI-Writer

用魔改 GPT 生成网文。Tuned GPT for novel generation. 原作者github地址:https://github.com/BlinkDL/AI-Writer

目录结构

|--AI-Writer.gif
|--AI-Writer.jpg
|--convert_pytorch2paddle.py # 转换pytorch权重代码
|--LICENSE
|--print_project_tree.py # 打印项目树状结构
|--README.md
|--run.py # 命令行运行
|--server.jpg
|--server.py # 开启服务
|--model
|      |--model_state.pdparams # 转换好的paddle权重文件
|      |--xuanhuan-2021-10-26.json
|      |--xuanhuan-2021-10-26.pth
|--paddle_src # 新版模型
|      |--model.py 
|      |--utils.py
|      |--__init__.py
|--paddle_src_slow # 旧版模型
|      |--convert_pytorch2paddle.py
|      |--model.py
|      |--utils.py
|      |--__init__.py
|--src # 原作者新版代码
|      |--model.py
|      |--utils.py
|      |--__init__.py
|--web-client # 前端页面
|      |--index.html
|      |--index.js

命令行使用方法:

  1. 进入原作者的 https://github.com/BlinkDL/AI-Writer ,下载模型,在右边 Release(或者看群文件),解压 pth 到 model 目录。
  2. python convert_pytorch2paddle.py 转换权重。
  3. 运行 python run.py
------------------------------------------------------------
  这是一颗急速旋转着的亮球!
  “呼!”
  就在这时,这颗亮球突然从林宇的手中飞了出来,在空中化成了一个小型的黄色的球状物。
  这是一颗乳白色的珠子,在现在的世界中,这样的球型物品无疑是非常罕见的,要知道林宇在世界之中也见识过很多。
  但是这样的球状物,却一直都是宝贝,可谓是难得一见,可以说是世界上最好的东西了。
  而且,在这颗球形的球形物里面,林宇甚至从中感觉到了一股仿佛随时都会倒下的强大压迫力,很明显,这就是天地
------------------------------------------------------------
  这是一颗很诡异的种子,同时也是一颗超级矿脉。
  杨昊到现在还不知道,那颗种子是怎样的恐怖,可能就连武帝和战帝都比不了。
  不过,杨昊倒是能够从那颗种子中感受到一种浓烈的生命之力,那种力量让他似乎都看到了一丝希望。
  不过,杨昊也知道自己恐怕很难活过去了,他身上可还有七十二颗种子呢。
  不过,事已至此,再想要活下去可就有点难了。
  杨昊将自身气息掩盖,悄然无息的潜伏在了杨昊的身后,以免他突然暴起伤人。
  就在杨昊暗自思
------------------------------------------------------------
  这是一颗强大的象征,是一个极其美丽的东西。
  而这颗象征着他智慧的树木,便是他最珍贵的东西了。
  第五百四十一章 见面
  当初,他是被林家选中的。
  有着如今的实力,更是在得到了林家的大力支持,以及大量的人气,而这些来自于其他地方的人,也都是纷纷在他的手中选出来了。
  至于对林家来说,这也是很好的事情。
  林家之中,其实已经有了很多的人才,甚至是能够成为更强大的人。
  但是,对于林家而言,却并不是很在意,这才是林家需要
------------------------------------------------------------

网页界面使用方法:

  1. 进入原作者的 https://github.com/BlinkDL/AI-Writer ,下载模型,在右边 Release(或者看群文件),解压 pth 到 model 目录。
  2. python convert_pytorch2paddle.py 转换权重。
  3. 运行 python server.py 开启服务。
  4. 打开 web-client/index.html,进行愉快的玩耍。

Reference

https://github.com/BlinkDL/AI-Writer


原作者的Readme

AI-Writer

用魔改 GPT 生成网文。Tuned GPT for novel generation. 现已支持 N卡 A卡 I卡 GPU 加速。

  1. 下载模型,在右边 Release(或者看 QQ 群文件),解压到 model 目录。欢迎分享下载后的模型。
  2. 运行 python run.py

也支持纯 CPU 快速生成,每秒生成 10 个字,下载请加 QQ 群 143626394(加入时请简单自我介绍)。

最新加入网页界面,执行 python server.py 然后打开 web-client 中的 index.html 即可。

Screenshot

注意:模型的训练数据全部来自网文,缺乏生活常识。生成的文字仅供娱乐。请遵守法律法规。

采用我的 RWKV 模型,比 GPT 更快,训练代码:https://github.com/BlinkDL/RWKV-LM

同时使用了特殊采样方法,改善小模型的生成质量(介绍见 https://zhuanlan.zhihu.com/p/394766831 )。

我的知乎是 https://www.zhihu.com/people/bopengbopeng

新玄幻模型效果:

Screenshot

旧模型效果:

Screenshot

魔皇突然倒退了一步,伸手摸了一下身上的伤口,然后朝着四周的虚空一指,原本在地下的虚空魔法阵直接消失无踪,这里顿时恢复了活性。 “来了……”魔皇喃喃的自语着,然后死死的盯着魔王的背影,不敢有丝毫的怠慢,在一个黑袍大汉的带领下,朝着人类的方向搜寻了过去。 几分钟之后,在前面的虚空魔法阵眼前一空,所有的人都露了出来,大家一个个的瞪大了眼睛。 “原来是魔皇大人。”听到魔皇的声音后,所有的人都感到惊讶,因为在他们眼中,这就是魔皇大人的魔导师,终于踏上了辉煌的魔法师之路,按理来说,能够拥有神力的魔导师是当之无愧的人类。 但是此刻魔皇的身影却消失在这片大海之中,似乎早就看穿了这一切,这让众人的心都悬了起来。 片刻之后,众人感觉到了空气中的清爽,所有人都猛的抬起头来,那巨大的眼睛里充满了向往,这样的表现让他们觉得此行不枉。 他们不由的弯下了嘴唇,暗自在心里偷笑,“还真是可怜这个少女,哪怕是族中最优秀的天才魔导

魔皇原本还想留下来帮助魔族重新实现宇宙皇庭,进入宇宙国之中,但是他们无法理解罗云阳的想法,纷纷开始接受宇宙国的鲜血,红颜的血液,在魔皇的支持之下,将一具完整的尸体交给了大罗龙族。 无一例外。 加上不知道如何改造的龙族族人,整个魔族,都是法则大打折扣的,大罗龙族之中,大多数族人,都是凡蜕境界的修炼者,并不是修炼的全部。 不过即便如此,所有人族也都是神通境界的强者,他们的血液,也是魔族的真血。 末世到来,整个魔族族人,都被献祭到了宇宙之中。 罗云阳和魔皇,曾经做过一些调查,想要杀害无辜的生命,但是无论他怎么做,没有丝毫的效果。 而在无数年前,同样的一些动手,让魔族损兵折将,没有对人族的敌人动手,也都是因为自己没有能够在魔界还保留在人族,而且在这个时候,魔界遭受重创的事情,却是一直没有发生。 因为他们也看出来,整个魔族,已经死于非命。 这些魔族,将在人族的战争之中,归属人族。 毕竟,人类发展到如今的

魔皇冲向洛寒,为什么没有动手,是因为洛寒身上释放出一种焚空气机,没有半点可以防御的地方。 他身上涌出恐怖的火焰,这股火焰团似乎是一个小火球,赤红色的火球让整个天空都是冒着一股可怕的黑气。 “明明是不受世界之力束缚的。” 魔皇双掌猛地一抱,以他的法力,在和洛寒的玄火火团对抗时,即便是伤了他,这点法力也没有放在眼里。 可洛寒就是这么不被世界之力束缚的火焰,身上燃烧着,死亡的恐怖气息似乎和天地能量结合在一起,魔皇手中一掌拍出,元神和本命精血之间产生出无尽的震动。 “死!” 魔皇周身同样结出魔灵附体,魔灵本源的修炼从高灵魔法转变为魔灵本源,正好对洛寒有克制力。 此刻身为天地之力合身,洛寒的火焰本源燃烧出了七个魔灵本源。 “阴阳生火术!” 洛寒灵识爆发,低喝一声,顿时手中双剑蕴含天地之力化作一个黑白色的龙形刀影,向洛寒的玉手迎去,三位魔皇分身见此,也紧随而上,全都在洛寒强大无比的灵识中施展各种神通,攻敌

Owner
yujun
Please show me your code.
yujun
Pytorch implementation of Tacotron

Tacotron-pytorch A pytorch implementation of Tacotron: A Fully End-to-End Text-To-Speech Synthesis Model. Requirements Install python 3 Install pytorc

soobin seo 203 Dec 02, 2022
Phrase-BERT: Improved Phrase Embeddings from BERT with an Application to Corpus Exploration

Phrase-BERT: Improved Phrase Embeddings from BERT with an Application to Corpus Exploration This is the official repository for the EMNLP 2021 long pa

70 Dec 11, 2022
A Structured Self-attentive Sentence Embedding

Structured Self-attentive sentence embeddings Implementation for the paper A Structured Self-Attentive Sentence Embedding, which was published in ICLR

Kaushal Shetty 488 Nov 28, 2022
Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingwai

TextCortex - HemingwAI Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingw

TextCortex AI 27 Nov 28, 2022
Text Classification in Turkish Texts with Bert

You can watch the details of the project on my youtube channel Project Interface Project Second Interface Goal= Correctly guessing the classification

42 Dec 31, 2022
Extract city and country mentions from Text like GeoText without regex, but FlashText, a Aho-Corasick implementation.

flashgeotext ⚡ 🌍 Extract and count countries and cities (+their synonyms) from text, like GeoText on steroids using FlashText, a Aho-Corasick impleme

Ben 57 Dec 16, 2022
A demo of chinese asr

chinese_asr_demo 一个端到端的中文语音识别模型训练、测试框架 具备数据预处理、模型训练、解码、计算wer等等功能 训练数据 训练数据采用thchs_30,

4 Dec 09, 2021
Beautiful visualizations of how language differs among document types.

Scattertext 0.1.0.0 A tool for finding distinguishing terms in corpora and displaying them in an interactive HTML scatter plot. Points corresponding t

Jason S. Kessler 2k Dec 27, 2022
Samantha, A covid-19 information bot which will provide basic information about this pandemic in form of conversation.

Covid-19-BOT Samantha, A covid-19 information bot which will provide basic information about this pandemic in form of conversation. This bot uses torc

Neeraj Majhi 2 Nov 05, 2021
fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.

fastNLP fastNLP是一款轻量级的自然语言处理(NLP)工具包,目标是快速实现NLP任务以及构建复杂模型。 fastNLP具有如下的特性: 统一的Tabular式数据容器,简化数据预处理过程; 内置多种数据集的Loader和Pipe,省去预处理代码; 各种方便的NLP工具,例如Embedd

fastNLP 2.8k Jan 01, 2023
Original implementation of the pooling method introduced in "Speaker embeddings by modeling channel-wise correlations"

Speaker-Embeddings-Correlation-Pooling This is the original implementation of the pooling method introduced in "Speaker embeddings by modeling channel

Themos Stafylakis 10 Apr 30, 2022
Official implementation of Meta-StyleSpeech and StyleSpeech

Meta-StyleSpeech : Multi-Speaker Adaptive Text-to-Speech Generation Dongchan Min, Dong Bok Lee, Eunho Yang, and Sung Ju Hwang This is an official code

min95 169 Jan 05, 2023
Unsupervised text tokenizer focused on computational efficiency

YouTokenToMe YouTokenToMe is an unsupervised text tokenizer focused on computational efficiency. It currently implements fast Byte Pair Encoding (BPE)

VK.com 847 Dec 19, 2022
OCR을 이용하여 인원수를 인식 후 줌을 Kill 해줍니다

How To Use killtheZoom-2.0 Windows 0. https://joyhong.tistory.com/79 이 글을 보면서 tesseract를 C:\Program Files\Tesseract-OCR 경로로 설치해주세요(한국어 언어 추가 필요) 상단의 초

김정인 9 Sep 13, 2021
HiFi DeepVariant + WhatsHap workflowHiFi DeepVariant + WhatsHap workflow

HiFi DeepVariant + WhatsHap workflow Workflow steps align HiFi reads to reference with pbmm2 call small variants with DeepVariant, using two-pass meth

William Rowell 2 May 14, 2022
Weird Sort-and-Compress Thing

Weird Sort-and-Compress Thing A weird integer sorting + compression algorithm inspired by a conversation with Luthingx (it probably already exists by

Douglas 1 Jan 03, 2022
Comprehensive-E2E-TTS - PyTorch Implementation

A Non-Autoregressive End-to-End Text-to-Speech (text-to-wav), supporting a family of SOTA unsupervised duration modelings. This project grows with the research community, aiming to achieve the ultima

Keon Lee 114 Nov 13, 2022
Almost State-of-the-art Text Generation library

Ps: we are adding transformer model soon Text Gen 🐐 Almost State-of-the-art Text Generation library Text gen is a python library that allow you build

Emeka boris ama 63 Jun 24, 2022
Meta learning algorithms to train cross-lingual NLI (multi-task) models

Meta learning algorithms to train cross-lingual NLI (multi-task) models

M.Hassan Mojab 4 Nov 20, 2022
neural network based speaker embedder

Content What is deepaudio-speaker? Installation Get Started Model Architecture How to contribute to deepaudio-speaker? Acknowledge What is deepaudio-s

20 Dec 29, 2022