Skip to content

Commit fe60904

Browse files
authored
readme : add TOC and Pygmalion instructions (#1359)
1 parent 003ba2f commit fe60904

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,39 @@ Inference of [LLaMA](https://arxiv.org/abs/2302.13971) model in pure C/C++
1212
- [Roadmap May 2023](https://github.com/ggerganov/llama.cpp/discussions/1220)
1313
- [New quantization methods](https://github.com/ggerganov/llama.cpp#quantization)
1414

15+
<details>
16+
<summary>Table of Contents</summary>
17+
<ol>
18+
<li>
19+
<a href="#description">Description</a>
20+
</li>
21+
<li>
22+
<a href="#usage">Usage</a>
23+
<ul>
24+
<li><a href="#get-the-code">Get the Code</a></li>
25+
<li><a href="#build">Build</a></li>
26+
<li><a href="#blas-build">BLAS Build</a></li>
27+
<li><a href="#prepare-data--run">Prepare Data & Run</a></li>
28+
<li><a href="#memorydisk-requirements">Memory/Disk Requirements</a></li>
29+
<li><a href="#quantization">Quantization</a></li>
30+
<li><a href="#interactive-mode">Interactive mode</a></li>
31+
<li><a href="#instruction-mode-with-alpaca">Instruction mode with Alpaca</a></li>
32+
<li><a href="#using-gpt4all">Using GPT4All</a></li>
33+
<li><a href="#using-pygmalion-7b--metharme-7b">Using Pygmalion 7B & Metharme 7B</a></li>
34+
<li><a href="#obtaining-the-facebook-llama-original-model-and-stanford-alpaca-model-data">Obtaining the Facebook LLaMA original model and Stanford Alpaca model data</a></li>
35+
<li><a href="#verifying-the-model-files">Verifying the model files</a></li>
36+
<li><a href="#seminal-papers-and-background-on-the-models">Seminal papers and background on the models</a></li>
37+
<li><a href="#perplexity-measuring-model-quality">Perplexity (measuring model quality)</a></li>
38+
<li><a href="#android">Android</a></li>
39+
<li><a href="#docker">Docker</a></li>
40+
</ul>
41+
</li>
42+
<li><a href="#contributing">Contributing</a></li>
43+
<li><a href="#coding-guidelines">Coding guidelines</a></li>
44+
<li><a href="#docs">Docs</a></li>
45+
</ol>
46+
</details>
47+
1548
## Description
1649

1750
The main goal of `llama.cpp` is to run the LLaMA model using 4-bit integer quantization on a MacBook
@@ -46,6 +79,7 @@ as the main playground for developing new features for the [ggml](https://github
4679
- [X] [Vicuna](https://github.com/ggerganov/llama.cpp/discussions/643#discussioncomment-5533894)
4780
- [X] [Koala](https://bair.berkeley.edu/blog/2023/04/03/koala/)
4881
- [X] [OpenBuddy 🐶 (Multilingual)](https://github.com/OpenBuddy/OpenBuddy)
82+
- [X] [Pygmalion 7B / Metharme 7B](#using-pygmalion-7b--metharme-7b)
4983

5084
**Bindings:**
5185

@@ -383,6 +417,19 @@ python3 convert.py models/gpt4all-7B/gpt4all-lora-quantized.bin
383417

384418
- The newer GPT4All-J model is not yet supported!
385419

420+
### Using Pygmalion 7B & Metharme 7B
421+
422+
- Obtain the [LLaMA weights](#obtaining-the-facebook-llama-original-model-and-stanford-alpaca-model-data)
423+
- Obtain the [Pygmalion 7B](https://huggingface.co/PygmalionAI/pygmalion-7b/) or [Metharme 7B](https://huggingface.co/PygmalionAI/metharme-7b) XOR encoded weights
424+
- Convert the LLaMA model with [the latest HF convert script](https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py)
425+
- Merge the XOR files with the converted LLaMA weights by running the [xor_codec](https://huggingface.co/PygmalionAI/pygmalion-7b/blob/main/xor_codec.py) script
426+
- Convert to `ggml` format using the `convert.py` script in this repo:
427+
```bash
428+
python3 convert.py pygmalion-7b/ --outtype q4_1
429+
```
430+
> The Pygmalion 7B & Metharme 7B weights are saved in [bfloat16](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format) precision. If you wish to convert to `ggml` without quantizating, please specify the `--outtype` as `f32` instead of `f16`.
431+
432+
386433
### Obtaining the Facebook LLaMA original model and Stanford Alpaca model data
387434

388435
- **Under no circumstances should IPFS, magnet links, or any other links to model downloads be shared anywhere in this repository, including in issues, discussions, or pull requests. They will be immediately deleted.**

0 commit comments

Comments
 (0)