Views
No views yet
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-VL-2B-Instruct |
| Model Type | Vision-Language Model (Image-to-Text) |
| Parameters | 2B |
| Language | English |
| License | Apache 2.0 |
| Developer | Kassadin88 |
| Type | Description |
|---|---|
| Inline formulas | Simple expressions like $E = mc^2$ |
| Display equations | Centered equations with equation numbering |
| Matrices | Matrix and array environments |
| Multi-line expressions | Aligned, gathered, and cases environments |
| Complex formulas | Nested fractions, integrals, summations, and tensor notation |
1from transformers import AutoModelForCausalLM, AutoProcessor
2from PIL import Image
3
4model_name = "Kassadin88/Qwen3-VL-2B-LaTeX-OCR"
5
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 trust_remote_code=True,
9 torch_dtype="auto"
10)
11processor = AutoProcessor.from_pretrained(
12 model_name,
13 trust_remote_code=True
14)
15
16image = Image.open("formula.png")
17messages = [
18 {"role": "user", "content": [
19 {"type": "image"},
20 {"type": "text", "text": "Transcribe the formula in the image to LaTeX."}
21 ]}
22]
23
24inputs = processor.apply_chat_template(
25 messages,
26 images=[image],
27 return_tensors="pt"
28)
29outputs = model.generate(**inputs, max_new_tokens=512)
30result = processor.decode(outputs[0], skip_special_tokens=True)
31print(result)1vllm serve Kassadin88/Qwen3-VL-2B-LaTeX-OCR \
2 --port 8000 \
3 --max-model-len 4096 \
4 --trust-remote-code1messages = [
2 {"role": "user", "content": [
3 {"type": "image"},
4 {"type": "text", "text": "Convert this mathematical formula to LaTeX."}
5 ]}
6]1@misc{qwen3-vl-2b-latex-ocr,
2 author = {Kassadin88},
3 title = {Qwen3-VL-2B-LaTeX-OCR: A Fine-Tuned Vision-Language Model for LaTeX OCR},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/Kassadin88/Qwen3-VL-2B-LaTeX-OCR}
7}