NLP / nlp.py
SUPERFIRE777's picture
Create nlp.py
f078df3
raw
history blame contribute delete
No virus
381 Bytes
from rwkvstic.load import RWKV
# Load the model (supports full path, relative path, and remote paths)
model = RWKV("https://huggingface.co/BlinkDL/rwkv-4-pile-3b/resolve/main/RWKV-4-Pile-3B-Instruct-test1-20230124.pth")
model.loadContext(newctx=f"I tried to put an apple into a box because it is too small. What is 'it'?")
output = model.forward(number=100)["output"]
print(output)