Upload README.md with huggingface_hub
Browse files1 unmodified line234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162631 unmodified linetags:- ocr- document-processing- glm-ocr- markdown- uv-script- generated---# Document OCR using GLM-OCRThis dataset contains OCR results from images in [NationalLibraryOfScotland/medical-history-of-british-india](https://huggingface.co/datasets/NationalLibraryOfScotland/medical-history-of-british-india) using GLM-OCR, a compact 0.9B OCR model achieving SOTA performance.## Processing Details- **Source Dataset**: [NationalLibraryOfScotland/medical-history-of-british-india](https://huggingface.co/datasets/NationalLibraryOfScotland/medical-history-of-british-india)- **Model**: [zai-org/GLM-OCR](https://huggingface.co/zai-org/GLM-OCR)- **Task**: text recognition- **Number of Samples**: 10- **Processing Time**: 6.2 min- **Processing Date**: 2026-02-14 18:31 UTC### Configuration- **Image Column**: `image`- **Output Column**: `markdown`- **Dataset Split**: `train`- **Batch Size**: 16- **Max Model Length**: 8,192 tokens- **Max Output Tokens**: 8,192- **Temperature**: 0.01- **Top P**: 1e-05- **GPU Memory Utilization**: 80.0%## Model InformationGLM-OCR is a compact, high-performance OCR model:- 0.9B parameters- 94.62% on OmniDocBench V1.5- CogViT visual encoder + GLM-0.5B language decoder- Multi-Token Prediction (MTP) loss for efficiency- Multilingual: zh, en, fr, es, ru, de, ja, ko- MIT licensed## Dataset StructureThe dataset contains all original columns plus:- `markdown`: The extracted text in markdown format- `inference_info`: JSON list tracking all OCR models applied to this dataset## Reproduction```bashuv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \NationalLibraryOfScotland/medical-history-of-british-india \<output-dataset> \--image-column image \--batch-size 16 \--task ocr```Generated with [UV Scripts](https://huggingface.co/uv-scripts)1 unmodified line2345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485861 unmodified linetags:- ocr- document-processing- deepseek- deepseek-ocr- markdown- uv-script- generated---# Document OCR using DeepSeek-OCRThis dataset contains markdown-formatted OCR results from images in [NationalLibraryOfScotland/medical-history-of-british-india](https://huggingface.co/datasets/NationalLibraryOfScotland/medical-history-of-british-india) using DeepSeek-OCR.## Processing Details- **Source Dataset**: [NationalLibraryOfScotland/medical-history-of-british-india](https://huggingface.co/datasets/NationalLibraryOfScotland/medical-history-of-british-india)- **Model**: [deepseek-ai/DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR)- **Number of Samples**: 10- **Processing Time**: 7.0 min- **Processing Date**: 2026-02-14 18:32 UTC### Configuration- **Image Column**: `image`- **Output Column**: `markdown`- **Dataset Split**: `train`- **Batch Size**: 8- **Max Model Length**: 8,192 tokens- **Max Output Tokens**: 8,192- **GPU Memory Utilization**: 80.0%## Model InformationDeepSeek-OCR is a state-of-the-art document OCR model that excels at:- LaTeX equations - Mathematical formulas preserved in LaTeX format- Tables - Extracted and formatted as HTML/markdown- Document structure - Headers, lists, and formatting maintained- Image grounding - Spatial layout and bounding box information- Complex layouts - Multi-column and hierarchical structures- Multilingual - Supports multiple languages## Dataset StructureThe dataset contains all original columns plus:- `markdown`: The extracted text in markdown format with preserved structure- `inference_info`: JSON list tracking all OCR models applied to this dataset## Usage```pythonfrom datasets import load_datasetimport json# Load the datasetdataset = load_dataset("{{output_dataset_id}}", split="train")# Access the markdown textfor example in dataset:print(example["markdown"])break# View all OCR models applied to this datasetinference_info = json.loads(dataset[0]["inference_info"])for info in inference_info:print(f"Column: {{info['column_name']}} - Model: {{info['model_id']}}")```## ReproductionThis dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) DeepSeek OCR vLLM script:```bashuv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/deepseek-ocr-vllm.py \\NationalLibraryOfScotland/medical-history-of-british-india \\<output-dataset> \\--image-column image```## Performance- **Processing Speed**: ~0.0 images/second- **Processing Method**: Batch processing with vLLM (2-3x speedup over sequential)Generated with [UV Scripts](https://huggingface.co/uv-scripts)
README.md+47-24