Instructions to use wolfofbackstreet/GLM-OCR-ONNX-q4f16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use wolfofbackstreet/GLM-OCR-ONNX-q4f16 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'wolfofbackstreet/GLM-OCR-ONNX-q4f16');
GLM-OCR ONNX (q4f16, browser-optimized)
Quantized q4f16 ONNX weights for GLM-OCR, packaged for Transformers.js WebGPU inference.
This repo contains only the q4f16 variant (635 MB) instead of all precision variants in onnx-community/GLM-OCR-ONNX (5+ GB).
Usage
import { AutoModelForImageTextToText, AutoProcessor } from '@huggingface/transformers';
const MODEL_ID = 'wolfofbackstreet/GLM-OCR-ONNX-q4f16';
const processor = await AutoProcessor.from_pretrained(MODEL_ID);
const model = await AutoModelForImageTextToText.from_pretrained(MODEL_ID, {
device: 'webgpu',
dtype: 'q4f16',
});
Source
Converted and quantized weights from onnx-community/GLM-OCR-ONNX.
- Downloads last month
- 46
Model tree for wolfofbackstreet/GLM-OCR-ONNX-q4f16
Base model
zai-org/GLM-OCR