Model reference · open weights

mgp-str

mgp-str is an open-weight language model from alibaba-damo, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.

Licence fee required LLMs alibaba-damo 1 variants 105k downloads/mo
Request a licence + hosting quote All served models Not on the shared API today — deployed on request.

About

What mgp-str is

MGP-STR (base-sized model) MGP-STR base-sized model is trained on MJSynth and SynthText. It was introduced in the paper Multi-Granularity Prediction for Scene Text Recognition and first released in this repository. Model description MGP-STR is pure vision STR model, consisting of ViT and specially designed A^3 modules. The ViT module was initialized from the weights of DeiT-base, except the patch embedding model, due to the inconsistent input size. Images (32x128) are presented to the model as a sequence of fixed-size patches (resolution 4x4), which are linearly embedded. One also adds absolute position embeddings before feeding the sequence to the layers of the ViT module. Next, A^3 module selects a meaningful combination from the tokens of ViT output and integrates them into one output token corresponding to a specific character. Moreover, subword classification heads based on BPE A^3 module and WordPiece A^3 module are devised for subword predictions, so that the language information can be implicitly modeled. Finally, these multi-granularity predictions (character, subword and even word) are merged via a simple and effective fusion strategy. Intended uses & limitations You can use the raw model for optical character recognition (OCR) on text images. See the model hub to look for fine-tuned versions on a task that interests you. How to use Here is how to use this model in PyTorch: BibTeX entry and citation info

Summarised from the published model card. Read the full card on the HuggingFace links below.

Specifications

What it is

Makeralibaba-damo
TypeLanguage models
Parameters (lead)148M
Variants1
Runs withtransformers
Released2022-11-23
Popularity105k downloads / month
Likes65
LicenceCommercial licence needed

How it works

How language models work

Your prompttext / messagesTransformerattention over tokensNext-token loopgenerate + streamResponsetext · tool callsA language model reads your tokens and predicts the next one, again and again, streaming the reply back.

Variants

Sizes & precisions

Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.

VariantParamsPrecisionVRAMFits 16 GBWeights
mgp-str-base148MBF16~0.3 GBWeights ↗

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys mgp-str for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mgp-str below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"mgp-str","messages":[{"role":"user","content":"Hello"}]}'

Details

Languages, data & research

Tags

transformers pytorch safetensors mgp-str image-to-text endpoints_compatible

Papers

Licence

Commercial licence needed

The weights are open but its licence needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗

Sources

Weights & code

Want mgp-str on EU-owned hardware?

Request a licence + hosting quote See what’s served now

Explore

More language models

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms