RWKV / rwkv.cpp

INT4/INT5/INT8 and FP16 inference on CPU for RWKV language model
MIT License
1.41k stars 95 forks source link

Fix: Replace all assertions in Python code with if statements #167

Closed whitealpa closed 7 months ago

whitealpa commented 7 months ago

Hi all,

Fixed #165

Please help review the pull request and suggest edits as needed.

Notes:

  1. I didn’t edit the test files.
  2. I'm not sure about the assertions that don't have any string return, so I didn't edit them. rwkv_word_tokenizer.py: line 78-79, 99 convert_pytorch_to_ggml.py: line 24 merge_lora_into_ggml.py: line 23

edit: I tried to use if not to preserve the original logical operation, not sure if this is preferred?

whitealpa commented 7 months ago

I've made typos with the word 'raise' in 2 files and they've already been fixed.