Changesets · Branches · Tags · Compare
| Changeset | b3aab86e9f7527d69f0eb99985250efaceba20d063aba72d15db0569bb6ed09b |
|---|---|
| Author | Prince Canuma <prince.gdt@gmail.com> · 2024-05-18 18:08 +02:00 |
| Committer | GitHub <noreply@github.com> · 2024-05-18 18:08 +02:00 |
| Parents | f7a231f0d8a6, 2c8133be0999 |
1 file changed
modified README.md +2 −2
| @@ -33,11 +33,11 @@ | ||
| 33 | 33 | model_path = "mlx-community/llava-1.5-7b-4bit" |
| 34 | 34 | model, processor = load(model_path) |
| 35 | 35 | |
| 36 | -prompt = processor.apply_chat_template( | |
| 36 | +prompt = processor.tokenizer.apply_chat_template( | |
| 37 | 37 | [{"role": "user", "content": f"<image>\nWhat are these?"}], |
| 38 | 38 | tokenize=False, |
| 39 | 39 | add_generation_prompt=True, |
| 40 | 40 | ) |
| 41 | 41 | |
| 42 | 42 | output = generate(model, processor, "http://images.cocodataset.org/val2017/000000039769.jpg", prompt, verbose=False) |
| 43 | -``` | |
| No newline at the end of the file | ||
| 43 | +``` |