API S/C for chating with AIs.
Files:
ChatAPI.CLI/modules/gpt-j-6b/chatapi-gpt-j-6b.py
ChatAPI.CLI/Server/GPTJWrapper.cs #WIP
python -m pip install torch transformers
And running with:
python3 chatapi-gpt-j-6b.py
When you see:
[Info <time>]: Loaded.
[Info <time>]: Running...
That represents the prepare work has been done.
Now, you can send a request by save a file into the requests
folder (will be craete at python work dictory):
echo 'I like oranges. How about you?' > requests/1.request #Filename must ends with ".request".
After the program finished work, the request file will be delete and a new file with extname ".back" which including the result of your request will be create:
cat requests/1.back
You can send Ctrl+C
key as normal.
Or you can create a file named quit.flag
into flags
folder:
touch flags/quit.flag
If the program detects the flag file (the detect work is after generate text), the program will quit.
Or you can create a file named status.flag
into flags
folder:
touch flags/status.flag
And you will get the status info:
cat flags/status.back
In fact, the Status
value will always be running
( because the detect work is after generate text**).**
@misc{gpt-j,
author = {Wang, Ben and Komatsuzaki, Aran},
title = {{GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model}},
howpublished = {\url{https://github.com/kingoflolz/mesh-transformer-jax}},
year = 2021,
month = May
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。