Elffuss BraidHub

kikocis/mlx-vlm public

Update README.md (#82)

Add load_config to the two example scripts in the readme so that they function as intended
Changesete7062e989c61a2789147a74664e4bef4940e4bc19ae8c9d44c649a14dfb2dd3a
Authormark <51519902+mark-lord@users.noreply.github.com> · 2024-10-12 15:35 +01:00
CommitterGitHub <noreply@github.com> · 2024-10-12 16:35 +02:00
Parents298bbfc46d57

Browse the files at this changeset

1 file changed

modified README.md +4 −0
@@ -47,10 +47,12 @@
4747 import mlx.core as mx
4848 from mlx_vlm import load, generate
4949 from mlx_vlm.prompt_utils import apply_chat_template
50+from mlx_vlm.utils import load_config
5051
5152 # Load the model
5253 model_path = "mlx-community/Qwen2-VL-2B-Instruct-4bit"
5354 model, processor = load(model_path)
55+config = load_config(model_path)
5456
5557 # Prepare input
5658 image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
@@ -87,9 +89,11 @@
8789 ```python
8890 from mlx_vlm import load, generate
8991 from mlx_vlm.prompt_utils import apply_chat_template
92+from mlx_vlm.utils import load_config
9093
9194 model_path = "mlx-community/Qwen2-VL-2B-Instruct-4bit"
9295 model, processor = load(model_path)
96+config = load_config(model_path)
9397
9498 images = ["path/to/image1.jpg", "path/to/image2.jpg"]
9599 prompt = "Compare these two images."