MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    利用GPT-2制作聊天机器人

    技术交流板块
    人工智能 nlp python
    9
    10
    1817
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RainChan
      RainChan 摸鱼 last edited by RainChan

      GPT-2是一种深度学习领域的语言模型,可以用于完成自然语言相关的生成任务。

      最近在GitHub上找到了一个项目,该项目使用GPT-2实现了在聊天过程中的短对话生成,并提供了预训练模型

      https://github.com/yangjianxin1/GPT2-chitchat

      效果

      我将其集成到了聊天机器人内,使用仓库内的预训练模型,群内使用效果如下

      Screenshot_20210810-235942.jpg

      虽然看起来聊天还算比较连贯,但其实很多时候不是嘴臭就是智障,也算是比较有趣了

      可以来我的群内实际体验一下206073050

      适配

      实际上并不需要很复杂的修改代码,只需要把他的历史记录单独按照每一个群成员记录即可。然后再使用flask启动一个http服务器为机器人进程服务即可

      性能

      系统:Windows server 2012r2 64位
      CPU:E5-2670v2 8核虚拟机
      内存:8GB
      在Python3.9下使用CPU推理,单次推理速度约700ms,可以满足负载不高的群内聊天推理,实际内存占用约为1.6GB

      1 Reply Last reply Reply Quote 1
      • 未来のミライ
        未来のミライ ⭐2021⭐ last edited by

        坐等小白化,话说我这小水管带不动啊

        RainChan 1 Reply Last reply Reply Quote 0
        • RainChan
          RainChan 摸鱼 @未来のミライ last edited by

          @未来のミライ 已经是很小白化了,就改几行Python代码就行,模型已经有大佬训练好了

          P 1 Reply Last reply Reply Quote 0
          • P
            poly000 @RainChan last edited by

            @rainchan 不会python怎么办QAQ

            1 Reply Last reply Reply Quote 0
            • Ruxiaochen
              Ruxiaochen last edited by

              请问能不能分享下修改后的文件?

              1 Reply Last reply Reply Quote 0
              • S
                sudo0m last edited by

                坐等小白花

                1 Reply Last reply Reply Quote 0
                • I
                  InfTommy last edited by

                  大佬能不能出一篇教程呢?

                  1 Reply Last reply Reply Quote 0
                  • 洛
                    洛绫华酱 last edited by

                    呜呜呜,浇浇我(蹲教程)

                    1 Reply Last reply Reply Quote 0
                    • Y
                      Yuki 0 last edited by

                      这个我有做,不过是用的gocqhttp
                      当时还不知道有mirai
                      项目的地址https://gitee.com/october_Wr/qq-chat-robot
                      有打包好的exe版

                      1 Reply Last reply Reply Quote 1
                      • moelan
                        moelan last edited by

                        linux能用吗?

                        1 Reply Last reply Reply Quote 0
                        • Referenced by  Mitr-yuzr Mitr-yuzr 
                        • Referenced by  Mitr-yuzr Mitr-yuzr 
                        • 1 / 1
                        • First post
                          Last post
                        Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact