|
|
11 mesi fa | |
|---|---|---|
| .. | ||
| android | 1 anno fa | |
| CMakeLists.txt | 11 mesi fa | |
| MobileVLM-README.md | 1 anno fa | |
| README-glmedge.md | 11 mesi fa | |
| README-minicpmo2.6.md | 11 mesi fa | |
| README-minicpmv2.5.md | 11 mesi fa | |
| README-minicpmv2.6.md | 1 anno fa | |
| README-quantize.md | 11 mesi fa | |
| README.md | 1 anno fa | |
| clip-quantize-cli.cpp | 11 mesi fa | |
| clip.cpp | 11 mesi fa | |
| clip.h | 11 mesi fa | |
| convert_image_encoder_to_gguf.py | 1 anno fa | |
| glmedge-convert-image-encoder-to-gguf.py | 11 mesi fa | |
| glmedge-surgery.py | 11 mesi fa | |
| llava-cli.cpp | 1 anno fa | |
| llava.cpp | 11 mesi fa | |
| llava.h | 1 anno fa | |
| llava_surgery.py | 1 anno fa | |
| llava_surgery_v2.py | 1 anno fa | |
| minicpmv-cli.cpp | 1 anno fa | |
| minicpmv-convert-image-encoder-to-gguf.py | 1 anno fa | |
| minicpmv-surgery.py | 1 anno fa | |
| qwen2_vl_surgery.py | 1 anno fa | |
| qwen2vl-cli.cpp | 1 anno fa | |
| requirements.txt | 1 anno fa | |
Currently this implementation supports glm-edge-v-2b and glm-edge-v-5b.
Build with cmake or run make llama-llava-cli to build it.
After building, run: ./llama-llava-cli to see the usage. For example:
./llama-llava-cli -m model_path/ggml-model-f16.gguf --mmproj model_path/mmproj-model-f16.gguf --image img_path/image.jpg -p "<|system|>\n system prompt <image><|user|>\n prompt <|assistant|>\n"
note: A lower temperature like 0.1 is recommended for better quality. add --temp 0.1 to the command to do so.
note: For GPU offloading ensure to use the -ngl flag just like usual
Clone a GLMV-EDGE model (2B or 5B). For example:
git clone https://huggingface.co/THUDM/glm-edge-v-5b or https://huggingface.co/THUDM/glm-edge-v-2b
Use glmedge-surgery.py to split the GLMV-EDGE model to LLM and multimodel projector constituents:
python ./examples/llava/glmedge-surgery.py -m ../model_path
Use glmedge-convert-image-encoder-to-gguf.py to convert the GLMV-EDGE image encoder to GGUF:
python ./examples/llava/glmedge-convert-image-encoder-to-gguf.py -m ../model_path --llava-projector ../model_path/glm.projector --output-dir ../model_path
Use examples/convert_hf_to_gguf.py to convert the LLM part of GLMV-EDGE to GGUF:
python convert_hf_to_gguf.py ../model_path
Now both the LLM part and the image encoder are in the model_path directory.