Uploaded Finetuned Model

Overview

This model is a fine-tuned version of Qwen2-VL-2B-Instruct, specifically optimized for converting handwritten mathematical formulas into machine-readable LaTeX format. The fine-tuning process leverages the unsloth framework for efficient low-bit precision training, making it suitable for deployment on resource-constrained environments.

Features

  • Accurate Handwritten Math OCR: Converts complex handwritten mathematical equations into LaTeX with high precision.
  • Vision-Language Capabilities: Leverages Qwen2-VL's advanced multimodal understanding.
  • Efficient Inference: Uses 4-bit quantization via unsloth for optimized performance.
  • Scalability: Suitable for deployment on various hardware configurations, from cloud to edge devices.
  • User-Friendly: Simple API integration with Hugging Face transformers.

Usage

To use this model for inference, load it with Hugging Face's transformers library:

from transformers import AutoModelForCausalLM, AutoProcessor
import torch

model_name = "path_to_your_finetuned_model"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
processor = AutoProcessor.from_pretrained(model_name)

# Load an image and get LaTeX output
image = "path_to_handwritten_math_image.jpg"
inputs = processor(images=image, return_tensors="pt")
outputs = model.generate(**inputs)
latex_code = processor.batch_decode(outputs, skip_special_tokens=True)
print("Generated LaTeX:", latex_code)
Downloads last month
6
Safetensors
Model size
2.21B params
Tensor type
BF16
·
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support