Commit
·
c840bb0
1
Parent(s):
d16f8b2
Add instructions for Ollama
Browse files
README.md
CHANGED
|
@@ -97,6 +97,42 @@ We followed the instructions in the [dpo repo](https://github.com/eric-mitchell/
|
|
| 97 |
| LLM360/AmberChat | 5.428125 |
|
| 98 |
| **LLM360/AmberSafe** | **4.725000** |
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
# Citation
|
| 101 |
|
| 102 |
**BibTeX:**
|
|
|
|
| 97 |
| LLM360/AmberChat | 5.428125 |
|
| 98 |
| **LLM360/AmberSafe** | **4.725000** |
|
| 99 |
|
| 100 |
+
|
| 101 |
+
# Using Quantized Models with Ollama
|
| 102 |
+
|
| 103 |
+
Please follow these steps to use a quantized version of AmberSafe on your personal computer or laptop:
|
| 104 |
+
|
| 105 |
+
1. First, install Ollama by following the instructions provided [here](https://github.com/jmorganca/ollama/tree/main?tab=readme-ov-file#ollama). Next, create a quantized version of AmberSafe model (say ambersafe.Q8_0.gguf for 8 bit quantized version) following instructions [here](https://github.com/jmorganca/ollama/blob/main/docs/import.md#manually-converting--quantizing-models).
|
| 106 |
+
|
| 107 |
+
2. Create an Ollama Modelfile locally using the template provided below:
|
| 108 |
+
```
|
| 109 |
+
FROM ambersafe.Q8_0.gguf
|
| 110 |
+
|
| 111 |
+
TEMPLATE """{{ .System }}
|
| 112 |
+
USER: {{ .Prompt }}
|
| 113 |
+
ASSISTANT:
|
| 114 |
+
"""
|
| 115 |
+
SYSTEM """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
|
| 116 |
+
"""
|
| 117 |
+
PARAMETER stop "USER:"
|
| 118 |
+
PARAMETER stop "ASSISTANT:"
|
| 119 |
+
PARAMETER repeat_last_n 0
|
| 120 |
+
PARAMETER num_ctx 2048
|
| 121 |
+
PARAMETER seed 0
|
| 122 |
+
PARAMETER num_predict -1
|
| 123 |
+
```
|
| 124 |
+
Ensure that the FROM directive points to the created checkpoint file.
|
| 125 |
+
|
| 126 |
+
3. Now, you can proceed to build the model by running:
|
| 127 |
+
```bash
|
| 128 |
+
ollama create ambersafe -f Modelfile
|
| 129 |
+
```
|
| 130 |
+
4. To run the model from the command line, execute the following:
|
| 131 |
+
```bash
|
| 132 |
+
ollama run ambersafe
|
| 133 |
+
```
|
| 134 |
+
You need to build the model once and can just run it afterwards.
|
| 135 |
+
|
| 136 |
# Citation
|
| 137 |
|
| 138 |
**BibTeX:**
|