Comments (2)
你可以考虑使用 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.
类似于这样可以吗?
多轮对话:
请求:
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)
- IndexError: list index out of range on ubuntu 20.04 when run python v2/chat.py HOT 2
- "LayerNormKernelImpl" not implemented for 'Half'
- cpu运算乱码问题 HOT 1
- Question about the accuracy of smaller checkpoints HOT 2
- 很好的模型,但是 HOT 4
- 求助time-mixing部分,处理数值溢出代码的解释
- Feature Request: an option to use Positional Interpolation to extent CTX length at inference time HOT 2
- Add a support to "stop_words" in PIPELINE
- 开源中文NSFW微调模型
- demo ? HOT 2
- demo true error ? HOT 1
- 'No CUDA GPUs are available' in google colab with V100 GPU and high RAM HOT 2
- huggingface无法访问,模型无法下载 HOT 4
- Prompt for RAG with RWKV-4-World-7B-v1-20230626-ctx4096 HOT 1
- [Feature Request] text2music HOT 2
- RuntimeError: Error building extension 'wkv_cuda_v1' HOT 2
- How to write the RWKV in autogressive style like RNN HOT 2
- NameError: name 'PIPELINE' is not defined HOT 1
- 大哥,乱码了 HOT 1
- 回复总是截断了,如何让回复自然的结束 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatrwkv.