rwkv.cpp
INT4/INT5/INT8 and FP16 inference on CPU for RWKV language model
File Explorer
Download Latest Version (.zip)- build.yml
- CODE_STYLE.md
- cuBLAS_on_Windows.md
- FILE_FORMAT.md
- hipBLAS_on_Windows.md
- CMakeLists.txt
- cpu_info.c
- quantize.c
- Chinese-Chat.json
- Chinese-QA.json
- English-Chat.json
- English-QA.json
- Japanese-Chat.json
- Japanese-QA.json
- __init__.py
- rwkv_cpp_model.py
- rwkv_cpp_shared_library.py
- rwkv_vocab_v20230424.txt
- rwkv_world_tokenizer.py
- rwkv_world_tokenizer.test.py
- 20B_tokenizer.json
- chat_with_bot.py
- convert_pytorch_to_ggml.py
- convert_pytorch_to_ggml.test.py
- generate_completions.py
- inference_example.py
- measure_pexplexity.py
- merge_lora_into_ggml.py
- quantize.py
- requirements.txt
- sampling.py
- tokenizer_util.py
- assertions.inc
- CMakeLists.txt
- expected-logits-4v0-660K.bin
- expected-logits-5v1-730K.bin
- expected-logits-5v2-730K.bin
- expected-logits-6v0-3m.bin
- expected-logits-7v0-834K.bin
- logit_difference_validator.inc
- test_context_cloning.c
- test_eval_sequence_in_chunks.c
- test_ggml_basics.c
- test_logit_calculation_skipping.c
- test_quantization_format_compatibility.c
- test_quantized_matmul_on_gpu.c
- test_tiny_rwkv.c
- tiny-rwkv-4v0-660K-FP16.bin
- tiny-rwkv-4v0-660K-FP32.bin
- tiny-rwkv-4v0-660K-Q5_0.bin
- tiny-rwkv-4v0-660K-Q5_1.bin
- tiny-rwkv-5v1-730K-FP16.bin
- tiny-rwkv-5v1-730K-FP32.bin
- tiny-rwkv-5v1-730K-Q5_0.bin
- tiny-rwkv-5v1-730K-Q5_1.bin
- tiny-rwkv-5v2-730K-FP16.bin
- tiny-rwkv-5v2-730K-FP32.bin
- tiny-rwkv-5v2-730K-Q5_0.bin
- tiny-rwkv-5v2-730K-Q5_1.bin
- tiny-rwkv-6v0-3m-FP16.bin
- tiny-rwkv-6v0-3m-FP32.bin
- tiny-rwkv-6v0-3m-Q5_0.bin
- tiny-rwkv-6v0-3m-Q5_1.bin
- tiny-rwkv-7v0-834K-FP16.bin
- tiny-rwkv-7v0-834K-FP32.bin
- tiny-rwkv-7v0-834K-Q5_0.bin
- tiny-rwkv-7v0-834K-Q5_1.bin
- .gitignore
- .gitmodules
- CMakeLists.txt
- ggml
- LICENSE
- README.md
- rwkv.cpp
- rwkv.h
- rwkv_error_handling.inc
- rwkv_eval.inc
- rwkv_file_format.inc
- rwkv_graph.inc
- rwkv_model_loading.inc
- rwkv_operators.inc
- rwkv_operators_wkv_v7.inc
- rwkv_quantize.inc
- rwkv_utilities.inc
# Installation Guide
1. Get the code
git clone https://github.com/RWKV/rwkv.cpp
Downloads the entire project code from GitHub to your computer.
cd rwkv.cpp
Moves into the project folder you just downloaded.
2. CMake
Medium RecommendedPrerequisites
cmake .
Type this command into your terminal and run it.
cmake --build . --config Release
Type this command into your terminal and run it.
cmake . -DRWKV_CUBLAS=ON
Type this command into your terminal and run it.
Check that an executable was created inside the build folder, then run it directly (e.g. ./build/app_name).
Pulled directly from this repo's README.
3. Python
EasyPrerequisites
pip install -r python/requirements.txt
Installs the Python libraries listed in requirements.txt (or similar).
python <μ€νν νμΌλͺ
>.py # READMEμμ μ νν μ€ν νμΌλͺ
μ νμΈνμΈμ
Runs the Python script (or module).
If it runs without errors and prints output in the terminal, it worked.
// repository documentation
Was this content helpful?
(0 ratings)
