Commit
·
8aa8299
1
Parent(s):
bcf9192
Update Ollama instructions - users need to download GGUF and create local model
Browse files
README.md
CHANGED
|
@@ -131,17 +131,36 @@ brew install ollama
|
|
| 131 |
# Or download from https://ollama.com
|
| 132 |
```
|
| 133 |
|
| 134 |
-
**Step 2:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
```bash
|
| 137 |
-
#
|
| 138 |
-
ollama
|
| 139 |
|
| 140 |
# Interactive mode
|
| 141 |
-
ollama run
|
| 142 |
|
| 143 |
# Single query
|
| 144 |
-
ollama run
|
| 145 |
```
|
| 146 |
|
| 147 |
**Using Ollama API (Python):**
|
|
@@ -155,7 +174,7 @@ import ollama
|
|
| 155 |
|
| 156 |
# Generate response
|
| 157 |
response = ollama.generate(
|
| 158 |
-
model='cveparrot',
|
| 159 |
prompt='Describe the security vulnerability CVE-2024-1234',
|
| 160 |
)
|
| 161 |
|
|
|
|
| 131 |
# Or download from https://ollama.com
|
| 132 |
```
|
| 133 |
|
| 134 |
+
**Step 2: Download the GGUF Model**
|
| 135 |
+
|
| 136 |
+
Download `cveparrot.gguf` from the [Files section](https://huggingface.co/Prachir-AI/cveparrot/tree/main) of this repository.
|
| 137 |
+
|
| 138 |
+
**Step 3: Create a Modelfile**
|
| 139 |
+
|
| 140 |
+
Create a file named `Modelfile` in the same directory as the downloaded GGUF:
|
| 141 |
+
|
| 142 |
+
```
|
| 143 |
+
FROM ./cveparrot.gguf
|
| 144 |
+
|
| 145 |
+
TEMPLATE """{{ .Prompt }}"""
|
| 146 |
+
|
| 147 |
+
PARAMETER temperature 0.7
|
| 148 |
+
PARAMETER top_p 0.9
|
| 149 |
+
PARAMETER top_k 40
|
| 150 |
+
PARAMETER num_ctx 2048
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
**Step 4: Create and Run the Model**
|
| 154 |
|
| 155 |
```bash
|
| 156 |
+
# Create the model in Ollama
|
| 157 |
+
ollama create cveparrot -f Modelfile
|
| 158 |
|
| 159 |
# Interactive mode
|
| 160 |
+
ollama run cveparrot
|
| 161 |
|
| 162 |
# Single query
|
| 163 |
+
ollama run cveparrot "Describe CVE-2024-1234"
|
| 164 |
```
|
| 165 |
|
| 166 |
**Using Ollama API (Python):**
|
|
|
|
| 174 |
|
| 175 |
# Generate response
|
| 176 |
response = ollama.generate(
|
| 177 |
+
model='cveparrot', # Use the local model name you created
|
| 178 |
prompt='Describe the security vulnerability CVE-2024-1234',
|
| 179 |
)
|
| 180 |
|