Image-to-Text
Transformers
Safetensors
qwen2_5_vl
image-text-to-text
OCR
vision-language
VLM
Reasoning
document-to-markdown
qwen2.5
markdown
extraction
RAG
text-generation-inference
Run this model with HF Jobs
Run numind/NuMarkdown-8B-Thinking on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/numind/NuMarkdown-8B-Thinking. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/numind/NuMarkdown-8B-Thinking on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use numind/NuMarkdown-8B-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use numind/NuMarkdown-8B-Thinking 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="numind/NuMarkdown-8B-Thinking")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("numind/NuMarkdown-8B-Thinking") model = AutoModelForMultimodalLM.from_pretrained("numind/NuMarkdown-8B-Thinking", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files221 unmodified lines22222322422522622722822914 unmodified lines2442452462472482492501 unmodified line252253254255256257258259260261262263264265221 unmodified lines## 🤗 Transformers:```pythonfrom __future__ import annotationsimport torchfrom PIL import Imagefrom transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration14 unmodified linestrust_remote_code=True,)img = Image.open("invoice.png").convert("RGB")messages = [{"role": "user","content": [1 unmodified line],}]prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)enc = processor(text=prompt, images=[img], return_tensors="pt").to(model.device)with torch.no_grad():out = model.generate(**enc, temperature = 0.7, max_new_tokens=5000)out = processor.decode(out[0])reasoning = out.split("<thinking>")[1].split("</thinking>")[0]answer = out.split("<answer>")[1].split("</answer>")[0]```221 unmodified lines22222322422522622714 unmodified lines2422432442452462472481 unmodified line250251252253254255256257258259260261262263221 unmodified lines## 🤗 Transformers:```pythonimport torchfrom PIL import Imagefrom transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration14 unmodified linestrust_remote_code=True,)img = Image.open("image.png").convert("RGB")messages = [{"role": "user","content": [1 unmodified line],}]prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)model_input = processor(text=prompt, images=[img], return_tensors="pt").to(model.device)with torch.no_grad():model_output = model.generate(**model_input, temperature = 0.7, max_new_tokens=5000)result = processor.decode(model_output[0])reasoning = result.split("<think>")[1].split("</think>")[0]answer = result.split("<answer>")[1].split("</answer>")[0]print(answer)```
README.md+7-9