Giter Club home page Giter Club logo

Comments (2)

mirrorange avatar mirrorange commented on May 9, 2024

你可以考虑使用 RWKV 的 pip 包。
You can consider using the rwkv pip package.

pip install rwkv

from rwkv.model import RWKV
from rwkv.utils import PIPELINE
model = RWKV("path_to_your_model", "cuda fp16i8")
pipeline = PIPELINE(model, "20B_tokenizer.json")
output = pipeline.generate("your_text")

from chatrwkv.

gg22mm avatar gg22mm commented on May 9, 2024

能不能变成多轮的接口如:
图片

类似于这样可以吗?

多轮对话:

请求:
curl -X POST "http://10.10.10.123:8000" -H 'Content-Type: application/json' -d '{"prompt": "一加一等于几?", "history": []}'

返回:
{"response":"一加一当然是等于二,这是最基础的数学计算问题。","history":[["一加一等于几?","一加一当然是等于二,这是最基础的数学计算问题。"]],"status":200,"time":"2023-04-17 13:30:20"}

多轮请求:
curl -X POST "http://10.10.10.123:8000" -H 'Content-Type: application/json' -d '{"prompt": "不是等于8吗", "history": [["一加一等于几?","一加一当然是等于二,这是最基础的数学计算问题。"]]}'

from chatrwkv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.