Skip to content

Commit

Permalink
Merge pull request ggml-org#14 from hypnopump/update_macos
Browse files Browse the repository at this point in the history
Update macOS, better instructions, streaming output
  • Loading branch information
saharNooby authored Apr 4, 2023
2 parents 77e1998 + d380134 commit dc679bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ cmake -DBUILD_SHARED_LIBS=ON .
cmake --build . --config Release
```

* **Anconda & M1 users**: Please verify that `CMAKE_SYSTEM_PROCESSOR: arm64` after running `cmake -DBUILD_SHARED_LIBS=ON .`
* If it detects `x86_64`, edit the `CMakeLists.txt` file under the `# Compile flags` to add `set(CMAKE_SYSTEM_PROCESSOR "arm64")`


If everything went OK, `librwkv.so` (Linux) or `rwkv.o` (MacOS) file should appear in the base repo folder.


Expand All @@ -66,10 +70,10 @@ If everything went OK, `librwkv.so` (Linux) or `rwkv.o` (MacOS) file should appe

```commandline
# Windows
python rwkv\convert_rwkv_to_ggml.py C:\RWKV-4b-Pile-169M-20220807-8023.pth C:\rwkv.cpp-169M.bin float32
python rwkv\convert_rwkv_to_ggml.py C:\RWKV-4-Pile-169M-20220807-8023.pth C:\rwkv.cpp-169M.bin float16
# Linux / MacOS
python rwkv/convert_pytorch_to_ggml.py ~/Downloads/RWKV-4b-Pile-169M-20220807-8023.pth ~/Downloads/rwkv.cpp-169M.bin float32
python rwkv/convert_pytorch_to_ggml.py ~/Downloads/RWKV-4-Pile-169M-20220807-8023.pth ~/Downloads/rwkv.cpp-169M.bin float16
```

#### 3.1. Optionally, quantize the model
Expand Down
2 changes: 1 addition & 1 deletion rwkv/chat_with_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

decoded = tokenizer.decode([token])

print(decoded, end='')
print(decoded, end='', flush=True)

if '\n' in decoded:
break
Expand Down

0 comments on commit dc679bf

Please sign in to comment.