For the complete documentation index, see llms.txt. This page is also available as Markdown.

GLM-OCR

हमारे Serverless Hosted API के माध्यम से image OCR के लिए GLM-OCR का उपयोग करें

GLM-OCR, GLM vision-language model family पर आधारित एक OCR model है। यह एक image से text का transcription करता है और documents, signs, तथा mixed layouts वाले labels के लिए अच्छी तरह उपयुक्त है। हम अपनी Serverless Hosted API, Dedicated Deployments, और self-hosted Inference.

कोड नमूना

GLM-OCR shared के माध्यम से चलता है /infer/lmm endpoint के माध्यम से चलता है। इसे सीधे HTTP endpoint के जरिए curl, या inference-sdk रैपर के साथ।

1

अपनी API Key प्राप्त करें

एक Roboflow खाता बनाएं, अपनी key यहाँ पर ढूँढें Roboflow API settings page और इसे अपने shell में उपलब्ध कराएँ:

export ROBOFLOW_API_KEY="your-key-here"
2

मॉडल चलाएँ

को कॉल करें /infer/lmm एंडपॉइंट को curl:

curl --location 'https://serverless.roboflow.com/infer/lmm' \
  --header 'Content-Type: application/json' \
  --data '{
    \"api_key\": \"'\"$ROBOFLOW_API_KEY\"'\",
    "image": {"type": "url", "value": "https://media.roboflow.com/inference/license_plate_1.jpg"},
    "model_id": "glm-ocr",
    "prompt": "OCR",
    "max_new_tokens": 128
  }'

Inference speed

Latency मापी गई Roboflow Inference 1x NVIDIA L4 पर, batch size 1 के साथ, fixed prompt से greedy decoding का उपयोग करके बिल्कुल 128 tokens generate करते हुए। Latency output length के साथ scale होती है, इसलिए अन्य lengths का अनुमान लगाने के लिए tokens/sec का उपयोग करें।

उपनाम
विलंबता, 128 tokens (ms)
टोकन/सेकंड

glm-ocr

1850

69

सेट करें api_url को अपने deployment target से मिलाएँ:

  • https://serverless.roboflow.com Serverless Hosted API के लिए।

  • http://localhost:9001 एक local Inference server.

  • आपका Dedicated Deployment एक private endpoint के लिए URL.

अंतिम अपडेट

क्या यह उपयोगी था?