rabbit commited on
Commit ·
e241053
1
Parent(s): f4708fd
update
Browse files2 unmodified lines3456789101112131 unmodified line15161718192021222324252 unmodified lines28293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485865 unmodified lines92939495969798991002 unmodified linesA Vision-Language Model (VLM) specialized in **document understanding and information extraction**, supporting both **unstructured information** and **structured data (tables)** from document images.This model is optimized for production usage via **vLLM serving** with an **OpenAI-compatible API**.---## 🚀 Features- Vision-Language Model for document images- Extracts **unstructured key–value information**- Extracts **structured table data**, including **column-wise extraction**1 unmodified line- Strict output formatting (no hallucination)- Compatible with **vLLM OpenAI-style API**- Prompting optimized for **Vietnamese instructions**---## 📌 Supported Data Types### 1. Unstructured InformationExtract specific fields defined by the user, such as:- Invoice number2 unmodified lines- Address- Total amount- Custom document attributes---### 2. Structured Table DataDesigned for extracting **individual columns** from tables, especially product tables.Capabilities:- Column-level extraction- Ignore non-product rows- Markdown-formatted output- Clean and deterministic structure---## 🔧 Deployment (vLLM)This model is intended to be deployed using **vLLM** with an OpenAI-compatible interface.Example:```bashvllm serve <model-path-or-name> \--served-model-name document-vlm \--port 8000```🧪 Prompt Usage🔹 Unstructured Data Extraction PromptPrompt Construction (Python)```bashprompt = f"""QUERY Trích xuất thông tin: {field_names}.INSTRUCTION:- Bắt buộc dữ liệu trả về theo format <index>. <key>:<value>, trong đó <index> là số thứ tự (1, 2, 3, 4, ...)- key lấy chính xác từ trong QUERY của tôi- không tự bịa dữ liệu và coi đó là điều hiển nhiên- nếu không thể trích xuất thì hãy trả lời: tôi không thể tìm thấy dữ liệu này"""```Expected Output```bash1. Số hóa đơn: INV-0012. Ngày phát hành: 12/03/20243. Tổng tiền: 1.250.000 VND```If data cannot be extracted:```bashtôi không thể tìm thấy dữ liệu này```🔹 Structured Table (Column-wise) Extraction PromptUsed to extract data for a specific column from a product table.```bash5 unmodified linesf"Yêu cầu tiêu đề cột là |{col_name}|.\n")``````bashExpected Output|Tên sản phẩm||------------||Sản phẩm A|2 unmodified lines3456789101 unmodified line12131415161718192 unmodified lines222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566675 unmodified lines73747576777879802 unmodified linesA Vision-Language Model (VLM) specialized in **document understanding and information extraction**, supporting both **unstructured information** and **structured data (tables)** from document images.This model is optimized for production usage via **vLLM serving** with an **OpenAI-compatible API**.---## 🚀 Features- Vision-Language Model for document images- Extracts **unstructured key–value information**- Extracts **structured table data**, including **column-wise extraction**1 unmodified line- Strict output formatting (no hallucination)- Compatible with **vLLM OpenAI-style API**- Prompting optimized for **Vietnamese instructions**---## 📌 Supported Data Types### 1. Unstructured InformationExtract specific fields defined by the user, such as:- Invoice number2 unmodified lines- Address- Total amount- Custom document attributes---### 2. Structured Table DataDesigned for extracting **individual columns** from tables, especially product tables.Capabilities:- Column-level extraction- Ignore non-product rows- Markdown-formatted output- Clean and deterministic structure---## 🔧 Deployment (vLLM)This model is intended to be deployed using **vLLM** with an OpenAI-compatible interface.Example:```bashvllm serve <model-path-or-name> \--served-model-name document-vlm \--port 8000```## Prompt UsageUnstructured Data Extraction PromptPrompt Construction (Python)```bashprompt = f"""QUERY Trích xuất thông tin: {field_names}.INSTRUCTION:- Bắt buộc dữ liệu trả về theo format <index>. <key>:<value>, trong đó <index> là số thứ tự (1, 2, 3, 4, ...)- key lấy chính xác từ trong QUERY của tôi- không tự bịa dữ liệu và coi đó là điều hiển nhiên- nếu không thể trích xuất thì hãy trả lời: tôi không thể tìm thấy dữ liệu này"""```Expected Output```bash1. Số hóa đơn: INV-0012. Ngày phát hành: 12/03/20243. Tổng tiền: 1.250.000 VND```If data cannot be extracted:```bashtôi không thể tìm thấy dữ liệu này```Structured Table (Column-wise) Extraction PromptUsed to extract data for a specific column from a product table.```bash5 unmodified linesf"Yêu cầu tiêu đề cột là |{col_name}|.\n")```Expected Output```bash|Tên sản phẩm||------------||Sản phẩm A|
README.md+11-31