Views
No views yet
scripts/export_glm_ocr_onnx.py (Transformers 5.1.0, custom torch.onnx path).glm_ocr_decoder.onnx / glm_ocr_decoder.onnx.data – Decoder ONNX (inputs: decoder_input_ids, encoder_hidden_states; output: logits).tokenizer.json, tokenizer_config.json – Tokenizer from zai-org/GLM-OCR.input_ids or inputs_embeds when called with image inputs only). To run full OCR you need encoder hidden states from another source or the original PyTorch model for the vision part.encoder_hidden_states (from your vision encoder or zai-org/GLM-OCR in PyTorch) and decoder_input_ids; get logits and decode with the included tokenizer.GLM_OCR_ONNX_Export.md or equivalent).