rwkv-4-world

我要开发同款
匿名用户2024年07月31日
27阅读
所属分类aipytorch、rwkv、causal-lm、text-generation、pytorch
开源地址https://modelscope.cn/models/AI-ModelScope/rwkv-4-world
授权协议Apache License 2.0

作品详情

RWKV-4 World

Model Description

RWKV-4 trained on 100+ world languages (70% English, 15% multilang, 15% code).

SomePile + SomeRedPajama + SomeOSCAR + AllWikipedia + AllChatGPTDataIcan_find

How to use:

  • use latest rwkv pip package (0.7.4+)
  • use https://github.com/BlinkDL/ChatRWKV/blob/main/v2/benchmark_world.py to test it
  • larger models are stronger even though not fully trained yet

The differences between World & Raven:

  • set pipeline = PIPELINE(model, "rwkvvocabv20230424") instead of 20Btokenizer.json (EXACTLY AS WRITTEN HERE. "rwkvvocab_v20230424" is included in rwkv 0.7.4+)
  • use Question/Answer or User/AI or Human/Bot for chat. DO NOT USE Bob/Alice or Q/A

For 0.1/0.4/1.5B models, use fp32 for first layer (will overflow in fp16 at this moment - fixable in future), or bf16 if you have 30xx/40xx GPUs. Example strategy: cuda fp32 *1 -> cuda fp16

NOTE: the new greedy tokenizer (https://github.com/BlinkDL/ChatRWKV/blob/main/tokenizer/rwkv_tokenizer.py) will tokenize '\n\n' as one single token instead of ['\n','\n']

QA prompt (replace \n\n in xxx to \n):

Question: xxx

Answer:

and

Instruction: xxx

Input: xxx

Response:

A good chat prompt (replace \n\n in xxx to \n):

User: hi

Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it.

User: xxx

Assistant:
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论