--- license: apache-2.0 language: - ko - en library_name: transformers base_model: Qwen/Qwen3.5-27B pipeline_tag: image-text-to-text tags: - ocr - korean - english - document-ai - document-understanding - vision-language - qwen3 - qwen3-vl - structured-extraction - public-document - academic-paper --- # Qwen3.5-27B OCR SFT v1 **Korean Public Documents & English Academic Papers · OCR · Semantic Structuring** **한국 공공문서 · 영어 논문 · OCR · 의미 분석 & 구조화 파인튜닝 모델** This model is **not a plain OCR model**. It is a Qwen3.5-VL 27B checkpoint fine-tuned to **interpret the meaning of document content and re-emit it as structured output** (Markdown, hierarchical tables, key-value fields, sectioned blocks) — trained with a **balanced Korean / English** corpus that emphasizes Korean public-sector documents and English research papers. 이 모델은 **단순 텍스트 인식 OCR이 아닙니다.** Qwen3.5-VL 27B를 베이스로, **한국 공공문서의 의미를 해석하고 구조화된 표현**(Markdown / 계층적 표 / 키-값 / 섹션)으로 출력하도록 파인튜닝한 버전입니다. 학습 데이터는 **AIHub의 한국 공공기관 문서**와 **HuggingFace 상의 영어 논문 데이터셋**을 **한국어·영어 균형 있게** 구성했습니다. > ⚠️ v1 — experimental checkpoint. Evaluation metrics and training recipe will be expanded in later revisions. / 실험적 체크포인트입니다. --- ## 🎯 What this model is good at / 이 모델의 강점 A generic OCR model "reads the glyphs." This model **reads, then understands, then reorganizes**. - **Structured output** — Identifies titles, body text, tables, lists, signature blocks, stamp regions; re-emits as Markdown / HTML tables / JSON-like structure. **구조화 출력** — 제목·본문·표·목록·서명란·도장 영역을 식별하고 Markdown / HTML 표 / JSON-like 구조로 재구성. - **Semantic analysis** — Not a raw string dump; fields are grouped by *what they mean* (발신기관, 문서번호, 결재선, 수신처, 시행일자, 붙임 / sender, doc-number, routing, addressee, effective date, attachments). **의미 분석** — 스트링 추출이 아닌 *"이 항목이 무엇을 의미하는가"* 기준으로 필드를 정리. - **Korean public-document specificity** — Handles 공문 서식, 관인/직인 영역, 기관 특유 표기(`○○시장`, `붙임`, `수신자 참조`), hierarchical legal numbering (제1조–제2항–제3호). **한국 공공문서 특성 반영** — 공문 서식, 관인·직인, 기관 고유 표기, 제N조–제N항–제N호 계층. - **English academic papers** — Abstract / section / figure-caption segmentation, citation-friendly reading order, math-adjacent tables. **영어 논문** — 초록·섹션·그림 캡션 분리, 인용을 고려한 읽기 순서, 표/수식 인접 구조 복원. - **Complex tables** — Merged cells, multi-row headers, empty cells, mixed units, footnoted tables — reconstructed as semantic units. **복잡한 표 처리** — 병합 셀, 다중 헤더, 빈 칸, 단위 혼재, 주석 포함 표를 의미 단위로 복원. - **Long context** — Up to **262K tokens**; multi-page documents can be processed in one pass. **장문 문맥** — 최대 **262K 토큰**으로 수십 페이지를 단일 호출에 처리. --- ## 📌 Specifications / 주요 사양 | | | |---|---| | **Base model** | [`Qwen/Qwen3.5-27B`](https://huggingface.co/Qwen/Qwen3.5-27B) | | **Architecture** | `Qwen3_5ForConditionalGeneration` (Hybrid Linear + Full Attention) | | **Parameters** | ≈ 27B · merged full weights (no adapter) | | **Precision** | bfloat16 | | **Context length** | 262,144 tokens | | **Vocab size** | 248,320 | | **Vision patch / merge** | 16 / 2 (Qwen3VLProcessor) | | **MTP module** | 1 layer (`model-mtp.safetensors`, optional serving) | | **Fine-tune type** | Full-parameter SFT, merged checkpoint | | **Languages** | Korean ↔ English (balanced) | | **License** | Apache-2.0 | --- ## 📚 Training Data / 학습 데이터 Balanced Korean / English corpus, document-centric: 한국어 / 영어 균형 구성, 문서 중심 코퍼스: - **AIHub Korean public-sector document datasets** — 공문, 고시, 공고, 신청서, 증명서, 결재 문서, 회의록, 각종 행정 양식. AIHub의 한국 공공기관 문서 데이터셋들: 공문 / 고시 / 공고 / 신청서 / 증명서 / 결재 문서 / 회의록 / 행정 양식. - **HuggingFace English academic paper datasets** — abstract, figures, tables, bibliography-style layouts. HuggingFace 상의 영어 논문 데이터셋: 초록, 그림, 표, 참고문헌 레이아웃. Tasks covered during SFT: OCR ground-truth transcription, Markdown/HTML structuring, field extraction, short semantic summary. SFT 과업: OCR 원문 전사, Markdown/HTML 구조화, 필드 추출, 짧은 의미 요약. --- ## 🚀 Quick Start / 빠른 시작 ### 1) Transformers ```python from transformers import AutoModelForImageTextToText, AutoProcessor from PIL import Image model_id = "Sooryeon/qwen3.5-27b-ocr-sft-v1" processor = AutoProcessor.from_pretrained(model_id) model = AutoModelForImageTextToText.from_pretrained( model_id, dtype="bfloat16", device_map="auto" ) image = Image.open("document.png").convert("RGB") messages = [{ "role": "user", "content": [ {"type": "image", "image": image}, {"type": "text", "text": "Convert this document to Markdown, preserving layout. " "Render tables as HTML