Views
No views yet

RWKVTokenizer and converted into binary .bin and .idx formats for efficient training.1from rwkv.model import RWKV
2from rwkv.utils import PIPELINE, PIPELINE_ARGS
3
4# Load the model
5model = RWKV(model='/path/to/rwkv7-prover-1.5b-merged.pth', strategy='cuda bf16')
6pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
7
8instruction = "Translate the following mathematical statement into Lean 4:"
9input_content = "There are infinitely many primes."
10ctx = f"Instruction: {instruction}\n\nInput: {input_content}\n\nResponse:"
11
12def my_print(s):
13 print(s, end='', flush=True)
14
15# Generate response
16pipeline.generate(ctx, token_count=200, args=PIPELINE_ARGS(
17 top_k=50, top_p=0.7, temperature=1.0, stop_token_ids=[0]), callback=my_print)