brad-agi/glm-ocr-onnx-webgpu
017
GLM-OCR ONNX (int8) for Browser WebGPU
Browser-ready ONNX export of zai-org/GLM-OCR (0.9B params). Runs entirely client-side via onnxruntime-web with WebGPU. No server needed.
Components
Base Models
KV Cache Models (fast autoregressive decoding)
Performance
3D Spatial Position IDs
The language model accepts 3D positionids `[4, batch, seqlen]` for full spatial awareness:
- Channel 0: temporal (0 for images)
- Channel 1: sequential position
- Channel 2: row position
- Channel 3: column position
Export Details
- Base model: zai-org/GLM-OCR (0.9B params)
- Quantization: int8 dynamic (onnxruntime)
- Vision encoder: TorchScript exporter, opset 14
- Language model: Dynamo exporter, opset 18
- KV cache: Packed tensor
[num_layers*2, batch, kv_heads, seq, head_dim] - 3D RoPE: Preserved via explicit position_ids input
License
Apache 2.0 (same as base model)
