Delete run_parvus.py
Browse files- run_parvus.py +0 -13
run_parvus.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
"""Runs Parvus with zero dependencies. Ask it anything."""
|
| 2 |
-
import json, struct
|
| 3 |
-
|
| 4 |
-
raw = open("model.safetensors", "rb").read()
|
| 5 |
-
n = struct.unpack("<Q", raw[:8])[0]
|
| 6 |
-
w = struct.unpack("<f", raw[8 + n : 8 + n + 4])[0] # the one parameter
|
| 7 |
-
|
| 8 |
-
vocab = json.load(open("vocab.json"))
|
| 9 |
-
id_to_tok = {v: k for k, v in vocab.items()}
|
| 10 |
-
|
| 11 |
-
while True:
|
| 12 |
-
input("You: ")
|
| 13 |
-
print("Parvus:", id_to_tok[round(w)])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|