Commit
•
4d226f4
1
Parent(s):
9f3256d
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
## Example usage
|
5 |
+
```
|
6 |
+
from rwkvstic.load import RWKV
|
7 |
+
|
8 |
+
# Load the model (supports full path, relative path, and remote paths)
|
9 |
+
|
10 |
+
model = RWKV(
|
11 |
+
"https://huggingface.co/Hazzzardous/RWKV-8Bit/resolve/main/RWKV-4-Pile-7B-Instruct.pqth"
|
12 |
+
)
|
13 |
+
|
14 |
+
model.loadContext(newctx=f"Q: who is Jim Butcher?\n\nA:")
|
15 |
+
output = model.forward(number=100)["output"]
|
16 |
+
|
17 |
+
print(output)
|
18 |
+
|
19 |
+
# Q: who is Jim Butcher?
|
20 |
+
# A: Jim Butcher is a very popular American author of fantasy novels. He’s known for the Dresden Files series of novels.<|endoftext|>
|
21 |
+
```
|
22 |
+
|
23 |
+
## More details here
|
24 |
+
https://pypi.org/project/rwkvstic/
|