zai-org / Glyph

huggingface.co
Total runs: 356
24-hour runs: 0
7-day runs: 35
30-day runs: -378
Model's Last Updated: October 25 2025
image-text-to-text

Introduction of Glyph

Model Details of Glyph

Glyph: Scaling Context Windows via Visual-Text Compression

abs

Glyph is a framework for scaling the context length through visual-text compression. Instead of extending token-based context windows, Glyph renders long textual sequences into images and processes them using vision–language models (VLMs). This design transforms the challenge of long-context modeling into a multimodal problem, substantially reducing computational and memory costs while preserving semantic information.

Backbone Model

Our model is built on GLM-4.1V-9B-Base .

Quick Inference

This is a simple example of running single-image inference using the transformers library.
First, install the transformers library:

pip install transformers>=4.57.1

Then, run the following code:

from transformers import AutoProcessor, AutoModelForImageTextToText
import torch

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "url": "https://raw.githubusercontent.com/thu-coai/Glyph/main/assets/Little_Red_Riding_Hood.png"
            },
            {
                "type": "text",
                "text": "Who pretended to be Little Red Riding Hood's grandmother"
            }
        ],
    }
]
processor = AutoProcessor.from_pretrained("zai-org/Glyph")
model = AutoModelForImageTextToText.from_pretrained(
    pretrained_model_name_or_path="zai-org/Glyph",
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt"
).to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=8192)
output_text = processor.decode(generated_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
print(output_text)

See our Github Repo for more detailed usage.

Known Limitations
  • Sensitivity to rendering parameters: Glyph’s performance can vary with rendering settings such as resolution, font, and spacing. Since our search procedure adopts a fixed rendering configuration during post-training, the model may not generalize well to unseen or substantially different rendering styles.
  • OCR-related challenges: Recognizing fine-grained or rare alphanumeric strings (e.g., UUIDs) remains difficult for visual-language models, especially with ultra-long inputs, sometimes leading to minor character misclassification.
  • Limited generalization: The training of Glyph mainly targets long-context understanding, and its capability on broader tasks is yet to be studied.
Citation

If you find our model useful in your work, please cite it with:

@article{cheng2025glyphscalingcontextwindows,
    title={Glyph: Scaling Context Windows via Visual-Text Compression}, 
    author={Jiale Cheng and Yusen Liu and Xinyu Zhang and Yulin Fei and Wenyi Hong and Ruiliang Lyu and Weihan Wang and Zhe Su and Xiaotao Gu and Xiao Liu and Yushi Bai and Jie Tang and Hongning Wang and Minlie Huang},
    journal={arXiv preprint arXiv:2510.17800},
    year={2025}
}

Runs of zai-org Glyph on huggingface.co

356
Total runs
0
24-hour runs
0
3-day runs
35
7-day runs
-378
30-day runs

More Information About Glyph huggingface.co Model

More Glyph license Visit here:

https://choosealicense.com/licenses/mit

Glyph huggingface.co

Glyph huggingface.co is an AI model on huggingface.co that provides Glyph's model effect (), which can be used instantly with this zai-org Glyph model. huggingface.co supports a free trial of the Glyph model, and also provides paid use of the Glyph. Support call Glyph model through api, including Node.js, Python, http.

zai-org Glyph online free

Glyph huggingface.co is an online trial and call api platform, which integrates Glyph's modeling effects, including api services, and provides a free online trial of Glyph, you can try Glyph online for free by clicking the link below.

zai-org Glyph online free url in huggingface.co:

https://huggingface.co/zai-org/Glyph

Glyph install

Glyph is an open source model from GitHub that offers a free installation service, and any user can find Glyph on GitHub to install. At the same time, huggingface.co provides the effect of Glyph install, users can directly use Glyph installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Glyph install url in huggingface.co:

https://huggingface.co/zai-org/Glyph

Url of Glyph

Provider of Glyph huggingface.co

zai-org
ORGANIZATIONS

Other API from zai-org

huggingface.co

Total runs: 2.9M
Run Growth: 2.7M
Growth Rate: 100.00%
Updated:September 07 2026
huggingface.co

Total runs: 1.9M
Run Growth: -142.7K
Growth Rate: -7.66%
Updated:January 29 2026
huggingface.co

Total runs: 1.7M
Run Growth: -1.2M
Growth Rate: -69.74%
Updated:September 11 2026
huggingface.co

Total runs: 986.1K
Run Growth: -799.8K
Growth Rate: -77.90%
Updated:September 01 2026
huggingface.co

Total runs: 974.2K
Run Growth: -1.8M
Growth Rate: -179.50%
Updated:September 01 2026
huggingface.co

Total runs: 947.3K
Run Growth: 879.3K
Growth Rate: 99.01%
Updated:September 04 2026
huggingface.co

Total runs: 459.0K
Run Growth: -2.2K
Growth Rate: -0.49%
Updated:August 04 2024
huggingface.co

Total runs: 175.3K
Run Growth: -242.0K
Growth Rate: -138.06%
Updated:April 16 2026
huggingface.co

Total runs: 103.9K
Run Growth: 32.2K
Growth Rate: 30.98%
Updated:January 29 2026
huggingface.co

Total runs: 97.1K
Run Growth: -86.8K
Growth Rate: -89.40%
Updated:August 11 2025
huggingface.co

Total runs: 94.1K
Run Growth: -22.4K
Growth Rate: -23.76%
Updated:August 11 2025
huggingface.co

Total runs: 85.4K
Run Growth: 3.4K
Growth Rate: 3.96%
Updated:May 13 2026
huggingface.co

Total runs: 85.2K
Run Growth: -909.6K
Growth Rate: -1067.93%
Updated:April 05 2026
huggingface.co

Total runs: 68.3K
Run Growth: -14.9K
Growth Rate: -21.80%
Updated:December 05 2024
huggingface.co

Total runs: 65.7K
Run Growth: -72.5K
Growth Rate: -110.30%
Updated:December 10 2025
huggingface.co

Total runs: 52.1K
Run Growth: -79.4K
Growth Rate: -152.46%
Updated:August 11 2026
huggingface.co

Total runs: 46.0K
Run Growth: -55.4K
Growth Rate: -120.54%
Updated:October 25 2025
huggingface.co

Total runs: 19.8K
Run Growth: -9.1K
Growth Rate: -45.61%
Updated:September 30 2025
huggingface.co

Total runs: 19.8K
Run Growth: -47.2K
Growth Rate: -238.76%
Updated:March 03 2025
huggingface.co

Total runs: 18.7K
Run Growth: -18.4K
Growth Rate: -98.30%
Updated:April 14 2025
huggingface.co

Total runs: 17.2K
Run Growth: 15.3K
Growth Rate: 96.94%
Updated:September 04 2026
huggingface.co

Total runs: 16.6K
Run Growth: -4.2K
Growth Rate: -25.51%
Updated:November 23 2024
huggingface.co

Total runs: 14.5K
Run Growth: -11.1K
Growth Rate: -75.96%
Updated:December 23 2025
huggingface.co

Total runs: 14.4K
Run Growth: -3.5K
Growth Rate: -24.66%
Updated:November 23 2024
huggingface.co

Total runs: 12.6K
Run Growth: 1.3K
Growth Rate: 9.99%
Updated:December 09 2025
huggingface.co

Total runs: 9.4K
Run Growth: 612
Growth Rate: 6.51%
Updated:January 15 2026
huggingface.co

Total runs: 8.3K
Run Growth: -1.1K
Growth Rate: -13.18%
Updated:October 16 2025
huggingface.co

Total runs: 7.0K
Run Growth: -1.6K
Growth Rate: -23.50%
Updated:March 11 2025
huggingface.co

Total runs: 6.8K
Run Growth: -7.0K
Growth Rate: -103.46%
Updated:April 22 2025
huggingface.co

Total runs: 4.7K
Run Growth: -3.6K
Growth Rate: -77.60%
Updated:December 09 2025
huggingface.co

Total runs: 3.2K
Run Growth: -856
Growth Rate: -26.83%
Updated:October 25 2025
huggingface.co

Total runs: 2.7K
Run Growth: 549
Growth Rate: 20.20%
Updated:August 04 2024
huggingface.co

Total runs: 2.6K
Run Growth: -7.4K
Growth Rate: -282.29%
Updated:January 27 2025
huggingface.co

Total runs: 1.9K
Run Growth: 451
Growth Rate: 24.14%
Updated:August 12 2025
huggingface.co

Total runs: 679
Run Growth: 282
Growth Rate: 41.53%
Updated:March 02 2023
huggingface.co

Total runs: 559
Run Growth: 359
Growth Rate: 64.22%
Updated:October 20 2023
huggingface.co

Total runs: 475
Run Growth: -233
Growth Rate: -49.05%
Updated:August 11 2025
huggingface.co

Total runs: 414
Run Growth: 155
Growth Rate: 37.44%
Updated:December 10 2024
huggingface.co

Total runs: 410
Run Growth: -1.0K
Growth Rate: -245.85%
Updated:January 02 2025
huggingface.co

Total runs: 271
Run Growth: 54
Growth Rate: 19.93%
Updated:November 20 2023
huggingface.co

Total runs: 259
Run Growth: 100
Growth Rate: 38.61%
Updated:October 20 2023
huggingface.co

Total runs: 251
Run Growth: 94
Growth Rate: 37.45%
Updated:October 20 2023