Skip to content

Commit af02c94

Browse files
committed
add easy Windows install instructions to the readme
Also fix a typo of LLaMA's casing in the chat.cpp file, and add cmake's generated files to the gitignore
1 parent 235a411 commit af02c94

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,22 @@ build-sanitize-addr/
1515
build-sanitize-thread/
1616

1717
models/*
18+
*.bin
1819

1920
/main
2021
/quantize
2122

2223
arm_neon.h
2324
compile_commands.json
25+
26+
# Windows CMake files
27+
*.vcxproj
28+
*.filters
29+
*.cmake
30+
*.sln
31+
x64/
32+
Debug/
33+
Release/
34+
CMakeFiles/
35+
CMakeCache.txt
36+
*.dir/

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This combines the [LLaMA foundation model](https://github.com/facebookresearch/l
1010

1111
## Get started
1212

13-
```
13+
```sh
1414
git clone https://github.com/antimatter15/alpaca.cpp
1515
cd alpaca.cpp
1616

@@ -34,6 +34,27 @@ Save the `ggml-alpaca-7b-q4.bin` file in the same directory as your `./chat` exe
3434

3535
The weights are based on the published fine-tunes from `alpaca-lora`, converted back into a pytorch checkpoint with a [modified script](https://github.com/tloen/alpaca-lora/pull/19) and then quantized with llama.cpp the regular way.
3636

37+
## Windows Setup
38+
39+
- Download and install CMake: <https://cmake.org/download/>
40+
- Download and install `git`. If you've never used git before, consider a GUI client like <https://desktop.github.com/>
41+
- Clone this repo using your git client of choice (for GitHub Desktop, go to File -> Clone repository -> From URL and paste `https://github.com/antimatter15/alpaca.cpp` in as the URL)
42+
- Open a Windows Terminal inside the folder you cloned the repository to
43+
- Run the following commands one by one:
44+
45+
```ps1
46+
cmake .
47+
cmake --build . --config Release
48+
```
49+
50+
- Download the weights via any of the links in "Get started" above, and save the file as `ggml-alpaca-7b-q4.bin` in the main Alpaca directory.
51+
- In the terminal window, run this command:
52+
```ps1
53+
.\Release\chat.exe
54+
```
55+
- (You can add other launch options like `--n 8` as preferred onto the same line)
56+
- You can now type to the AI in the terminal and it will reply. Enjoy!
57+
3758
## Credit
3859

3960
This combines [Facebook's LLaMA](https://github.com/facebookresearch/llama), [Stanford Alpaca](https://crfm.stanford.edu/2023/03/13/alpaca.html), [alpaca-lora](https://github.com/tloen/alpaca-lora) and [corresponding weights](https://huggingface.co/tloen/alpaca-lora-7b/tree/main) by Eric Wang (which uses [Jason Phang's implementation of LLaMA](https://github.com/huggingface/transformers/pull/21955) on top of Hugging Face Transformers), and [llama.cpp](https://github.com/ggerganov/llama.cpp) by Georgi Gerganov. The chat implementation is based on Matvey Soloviev's [Interactive Mode](https://github.com/ggerganov/llama.cpp/pull/61) for llama.cpp. Inspired by [Simon Willison's](https://til.simonwillison.net/llms/llama-7b-m2) getting started guide for LLaMA.

chat.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ int main(int argc, char ** argv) {
915915
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
916916
" - Press Ctrl+C to interject at any time.\n"
917917
#endif
918-
" - Press Return to return control to LLaMa.\n"
918+
" - Press Return to return control to LLaMA.\n"
919919
" - If you want to submit another line, end your input in '\\'.\n");
920920
}
921921

0 commit comments

Comments
 (0)