Image-to-Text
Transformers
ONNX
Safetensors
vision-encoder-decoder
image-text-to-text
typst
math-ocr
formula-recognition
browser
grayscale
Instructions to use dbcccc/TypLens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dbcccc/TypLens with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="dbcccc/TypLens")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("dbcccc/TypLens") model = AutoModelForMultimodalLM.from_pretrained("dbcccc/TypLens", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download release-manifest.json from dbcccc/TypLens: direct link, hf CLI and curl.
- Browser
- Download file 3.04 kB
-
https://huggingface.co/dbcccc/TypLens/resolve/main/release-manifest.json
- Command line
-
hf download hf://dbcccc/TypLens/release-manifest.json
-
curl -L -o release-manifest.json https://huggingface.co/dbcccc/TypLens/resolve/main/release-manifest.json
3.04 kB
| { | |
| "schema_version": "typlens-weights-release-v1", | |
| "repository_name": "TypLens", | |
| "model_name": "TypLens V1.1", | |
| "version": "v1.1", | |
| "release_date": "2026-09-24", | |
| "license": "MIT", | |
| "parameters": 29206656, | |
| "source_model_sha256": "d42cfd2da242a11ecdb1fe8727ee01e6896a116cd46f74357c4fdce90eebe788", | |
| "checkpoint_step": 33544, | |
| "training_epochs": 8, | |
| "training_examples": 268346, | |
| "base_model": "breezedeus/pix2text-mfr-1.5", | |
| "base_model_revision": "1cef9f0bdcd6a4c63df7de1311fb0894593340cc", | |
| "initialization": "Upstream-derived native-vocabulary initializer; not the released V1 checkpoint. RGB patch kernels summed into one channel before training.", | |
| "output_language": "typst", | |
| "inference_conversion": "none", | |
| "vocabulary_size": 1199, | |
| "input": { | |
| "name": "pixel_values", | |
| "dtype": "float32", | |
| "shape": [ | |
| 1, | |
| 1, | |
| 384, | |
| 384 | |
| ] | |
| }, | |
| "preprocessing": { | |
| "version": "native-content-box-gray-v2", | |
| "channels": 1, | |
| "width": 384, | |
| "height": 384, | |
| "grayscale_weights": [ | |
| 77, | |
| 150, | |
| 29 | |
| ], | |
| "grayscale_divisor": 256, | |
| "alpha_background": 255, | |
| "foreground_delta": 12, | |
| "margin_ratio": 0.02, | |
| "min_margin": 1, | |
| "polarity": "perimeter-median-below-128", | |
| "resampler": "pillow-bicubic-u8-v1", | |
| "mean": [ | |
| 0.5 | |
| ], | |
| "std": [ | |
| 0.5 | |
| ] | |
| }, | |
| "generation": { | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "pad_token_id": 0, | |
| "max_new_tokens": 1023, | |
| "strategy": "greedy", | |
| "forced_eos": false | |
| }, | |
| "quantization": { | |
| "algorithm": "onnxruntime.quantization.quantize_dynamic", | |
| "weight_type": "QInt8", | |
| "per_channel": true, | |
| "op_types_to_quantize": [ | |
| "MatMul", | |
| "Gemm" | |
| ], | |
| "extra_options": { | |
| "MatMulConstBOnly": true | |
| } | |
| }, | |
| "artifacts": { | |
| "model.safetensors": { | |
| "bytes": 116870000, | |
| "sha256": "d42cfd2da242a11ecdb1fe8727ee01e6896a116cd46f74357c4fdce90eebe788" | |
| }, | |
| "onnx/fp32/encoder.onnx": { | |
| "bytes": 91338076, | |
| "sha256": "acca3ad0660b30d8292b657e3164e54e66d75b594fc05d7d005cb94044579087" | |
| }, | |
| "onnx/fp32/decoder.onnx": { | |
| "bytes": 25839275, | |
| "sha256": "c974116f76b518aa9b7dcd7e310cdaf55054a889433a395a62e0df009daf6caf" | |
| }, | |
| "onnx/int8/encoder.onnx": { | |
| "bytes": 24482005, | |
| "sha256": "844a4aee1e22ca0a71d0a5b29c7d9fec00f976f7528a50af2ce1c141deb37ab1" | |
| }, | |
| "onnx/int8/decoder.onnx": { | |
| "bytes": 8638761, | |
| "sha256": "9bf4bfd55786c45b7fe92221c0b752c70bb405d028f5e7d4f066814e839b70df" | |
| } | |
| }, | |
| "artifact_paths_relative_to": "Hugging Face repository root", | |
| "token_bytes": { | |
| "bytes": 50278, | |
| "sha256": "56dda3b8c135390aef1c8e6ca86f5f3598576c4f4bc61184639a1abfb22c5a9d" | |
| }, | |
| "metadata_changes": "generation_config: max_new_tokens=1023, do_sample=false, num_beams=1, forced_eos_token_id=null; learned parameters and graphs unchanged.", | |
| "training_code_included": false, | |
| "optimizer_state_included": false, | |
| "datasets_included": false, | |
| "runtime_binaries_included": false | |
| } | |