Update README.md
Browse files
README.md
CHANGED
@@ -6,4 +6,22 @@ pipeline_tag: text-generation
|
|
6 |
---
|
7 |
# dolly-v2-12b-q4 Model Card
|
8 |
|
9 |
-
[dolly-v2-12b](https://huggingface.co/databricks/dolly-v2-12b) converted to GGML format and quantized to 4-bit using https://github.com/NolanoOrg/cformers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
---
|
7 |
# dolly-v2-12b-q4 Model Card
|
8 |
|
9 |
+
[dolly-v2-12b](https://huggingface.co/databricks/dolly-v2-12b) converted to GGML format and quantized to 4-bit using https://github.com/NolanoOrg/cformers.
|
10 |
+
|
11 |
+
|
12 |
+
## Running the model
|
13 |
+
|
14 |
+
[This fork](https://github.com/raymondhs/cformers) has the modification that includes Dolly in the model list.
|
15 |
+
|
16 |
+
```python
|
17 |
+
from interface import AutoInference as AI
|
18 |
+
ai = AI("databricks/dolly-v2-12b")
|
19 |
+
prompt_template = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
20 |
+
### Instruction:
|
21 |
+
{instruction}
|
22 |
+
### Response:
|
23 |
+
"""
|
24 |
+
instruction = "Explain to me the difference between nuclear fission and fusion."
|
25 |
+
x = ai.generate(prompt_template.format(instruction=instruction), num_tokens_to_generate=100)
|
26 |
+
print(x['token_str'])
|
27 |
+
```
|