Update README.md
Browse files
README.md
CHANGED
|
@@ -46,6 +46,33 @@ GGUFs:
|
|
| 46 |
- BakLLaVA-1: https://huggingface.co/mys/ggml_bakllava-1
|
| 47 |
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
Example:
|
| 50 |

|
| 51 |
|
|
|
|
| 46 |
- BakLLaVA-1: https://huggingface.co/mys/ggml_bakllava-1
|
| 47 |
|
| 48 |
|
| 49 |
+
Test code:
|
| 50 |
+
```python
|
| 51 |
+
from llava.mm_utils import get_model_name_from_path
|
| 52 |
+
from llava.eval.run_llava import eval_model
|
| 53 |
+
|
| 54 |
+
model_path = "vonjack/Hermes-2-Pro-BakLLaVA-Mistral-7B"
|
| 55 |
+
|
| 56 |
+
prompt = "What's the content of the image?"
|
| 57 |
+
image_file = "https://www.ilankelman.org/stopsigns/australia.jpg"
|
| 58 |
+
|
| 59 |
+
args = type('Args', (), {
|
| 60 |
+
"model_path": model_path,
|
| 61 |
+
"model_base": None,
|
| 62 |
+
"model_name": get_model_name_from_path(model_path),
|
| 63 |
+
"query": prompt,
|
| 64 |
+
"conv_mode": None,
|
| 65 |
+
"image_file": image_file,
|
| 66 |
+
"sep": ",",
|
| 67 |
+
"temperature": 0,
|
| 68 |
+
"top_p": None,
|
| 69 |
+
"num_beams": 1,
|
| 70 |
+
"max_new_tokens": 512
|
| 71 |
+
})()
|
| 72 |
+
|
| 73 |
+
eval_model(args)
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
Example:
|
| 77 |

|
| 78 |
|