Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
---
|
5 |
+
Converted version of [gpt4all](https://github.com/nomic-ai/gpt4all) weights with ggjt magic for use in [llama.cpp](https://github.com/ggerganov/llama.cpp) or [pyllamacpp](https://github.com/nomic-ai/pyllamacpp).
|
6 |
+
Full creadit goes to the [GPT4All project](https://github.com/nomic-ai/gpt4all)
|
7 |
+
|
8 |
+
## Usage via pyllamacpp
|
9 |
+
|
10 |
+
Installation: `pip install pyllamacpp`
|
11 |
+
|
12 |
+
Download and inference:
|
13 |
+
|
14 |
+
```python
|
15 |
+
from huggingface_hub import hf_hub_download
|
16 |
+
from pyllamacpp.model import Model
|
17 |
+
|
18 |
+
#Download the model
|
19 |
+
hf_hub_download(repo_id="LLukas22/gpt4all-lora-quantized-ggjt", filename="ggjt-model.bin", local_dir=".")
|
20 |
+
|
21 |
+
#Load the model
|
22 |
+
model = Model(ggml_model="ggjt-model.bin", n_ctx=2000)
|
23 |
+
|
24 |
+
#Generate
|
25 |
+
prompt="The meaning of life is"
|
26 |
+
|
27 |
+
result=model.generate(prompt,n_predict=50)
|
28 |
+
```
|