Instructions to use unsloth/GLM-OCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/GLM-OCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="unsloth/GLM-OCR")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("unsloth/GLM-OCR") model = AutoModelForImageTextToText.from_pretrained("unsloth/GLM-OCR") - Notebooks
- Google Colab
- Kaggle
finetune notebook
#2
by leniad - opened
Could you guys provide a notebook on how to finetune this bad boy for multiple image prompts? I am trying to follow your notebooks to do it myself but the only output I can get from this model after lora is <|begin_of_image|>. Why multiple image in single prompt? Structured data spread across the pages.
Yes! Please! :)
but why we dont have unsloth notebook to fine tune