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