Image-Text-to-Text
MLX
Safetensors
Chinese
ocr
rare-characters
ids
ideographic-description-sequence
glyphwiki
palaeography
Instructions to use OpenGlyph/OpenGlyph-OCR-IDS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenGlyph/OpenGlyph-OCR-IDS with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("OpenGlyph/OpenGlyph-OCR-IDS") config = load_config("OpenGlyph/OpenGlyph-OCR-IDS") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download NOTICE from OpenGlyph/OpenGlyph-OCR-IDS: direct link, hf CLI and curl.
- Browser
- Download file 2.62 kB
-
https://huggingface.co/OpenGlyph/OpenGlyph-OCR-IDS/resolve/main/NOTICE
- Command line
-
hf download hf://OpenGlyph/OpenGlyph-OCR-IDS/NOTICE
-
curl -L -o NOTICE https://huggingface.co/OpenGlyph/OpenGlyph-OCR-IDS/resolve/main/NOTICE
2.62 kB
| OpenGlyph-OCR-IDS | |
| This repository contains, in base/, the model Xiaomi-OCR-0 | |
| (https://huggingface.co/xiaomi-research/Xiaomi-OCR-0), released by its authors under the | |
| Apache License, Version 2.0, and itself built on Qwen3.5-0.8B-Base. The files in base/ | |
| are redistributed unchanged; their SHA-256 hashes are listed in release.json. | |
| openglyph-ocr-0.safetensors and tokens.json are the files of the same names in | |
| OpenGlyph/OpenGlyph-OCR-0 (https://huggingface.co/OpenGlyph/OpenGlyph-OCR-0), the work of | |
| the OpenGlyph project: the arrays trained on top of Xiaomi-OCR-0 (LoRA arrays on every | |
| linear map of the last six language layers, the last four vision blocks and the patch | |
| merger retrained, an output row and a bias for each of 159,052 added tokens) and the | |
| added tokens. | |
| The other files -- opener.safetensors, part-reader.safetensors, speller.safetensors, | |
| ids-tables.json, reading.json, token-counts.json, the package openglyph_ocr_ids/, | |
| figures/, requirements.txt, release.json and README.md -- are the work of the OpenGlyph | |
| project and are licensed under the Apache License, Version 2.0 (see LICENSE), with the | |
| exception named below. They add to the model: | |
| - 14 tokens (<ids>, </ids> and the twelve structure characters U+2FF0..U+2FFB) with | |
| fixed input rows taken from rows of the base embedding, and output rows and biases; | |
| - three further sets of arrays that are put into the model in turn while a line is | |
| read: LoRA arrays of the language layers 18 to 23 (the opener; the part reader), and | |
| LoRA arrays of the language layers 18 to 23, of every vision block and of the patch | |
| merger, output rows of the structure tokens and output rows of the steps of parts | |
| (the speller). | |
| Nothing is merged into the base weights: openglyph_ocr_ids/build.py puts everything | |
| together when it builds the model. | |
| canon.json is a table from Ideographic Description Sequences to encoded characters and to | |
| GlyphWiki glyphs. It is derived from | |
| - CJKVI IDS (https://github.com/cjkvi/cjkvi-ids), which is derived from the CHISE IDS | |
| database and follows its terms (GNU General Public License, version 2); | |
| - BabelStone's IDS data (https://www.babelstone.co.uk/CJK/IDS.TXT), which its author | |
| states anyone is free to use without permission or attribution; | |
| - GlyphWiki (https://glyphwiki.org): its glyph names and the IDS names of its glyphs. | |
| canon.json is used and redistributed under the terms of those sources. | |
| Glyph names of the form <gw:NAME> are names of glyphs in GlyphWiki (https://glyphwiki.org). | |
| This is not a product of Xiaomi or of the authors of Xiaomi-OCR-0, and is not endorsed | |
| by them. | |