alt.freeweights.glm / cogagent-chat-hf
From: zai-org <huggingface.co/zai-org>Newsgroups: alt.freeweights.glmSubject:

cogagent-chat-hf

Date: 2026-11-15Commit: 26eec27Signed: 2DC28CC7B26A283B ✓

Text generation model with 18.3B parameters. Safetensors weights, 36.6 GB in all. Published by zai-org under Apache-2.0.

18.3B params36.6GBcogagent-chat-hfsafetensorspermissive
FactsParams18.3BSize36.6 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get zai-org/cogagent-chat-hf
# manifest sha256 b0ab2015b746… · 36.6 GB · 18 files
$ fw verify ./cogagent-chat-hf zai-org/cogagent-chat-hf
From sourceHosted (signed)zai-org/cogagent-chat-hfLast check: 2026-11-15 03:49 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
36.6 GB
Weights
36.6 GB (safetensors)
Parameters
18.3B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
18, each with a sha256
Publisher
zai-org
Added
2026-11-15
Section
alt.freeweights.glm
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commitโ†’You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:49 UTCpassed

Model card

From the publisher at commit 26eec27. Shown as plain text with links; images open at the publisher.

CogAgent#

๐Ÿ”ฅ News: The new version CogAgent-9B-20241220 has been released! Welcome to visit CogAgent GitHub and Technical Report to explore and use our latest model.

๐Ÿ“– Paper: https://arxiv.org/abs/2312.08914

๐Ÿ“„ Technical Report: https://cogagent.aminer.cn/blog#/articles/cogagent-9b-20241220-technical-report-en

๐Ÿš€ GitHub: https://github.com/THUDM/CogAgent

๐Ÿค— Model Page: https://huggingface.co/THUDM/cogagent-9b-20241220

CogAgent is an open-source visual language model improved based on CogVLM. For more information such as demo, fine-tuning of THUDM/cogagent-chat-hf, and query prompts, please refer to This GitHub

Reminder#

๐Ÿ“ This is the cogagent-chat version of CogAgent checkpoint.

We have open-sourced 2 versions of CogAgent checkpoints, and you can choose one based on your needs.

  1. cogagent-chat: This model has strong capabilities in GUI Agent, visual multi-turn dialogue, visual grounding, etc. If you need GUI Agent and Visual Grounding functions, or need to conduct multi-turn dialogues with a given image, we recommend using this version of the model.
  2. cogagent-vqa: This model has stronger capabilities in single-turn visual dialogue. If you need to work on VQA benchmarks (such as MMVET, VQAv2), we recommend using this model.

Introduction#

CogAgent-18B has 11 billion visual and 7 billion language parameters.

CogAgent demonstrates strong performance in image understanding and GUI agent:

  1. CogAgent-18B achieves state-of-the-art generalist performance on 9 cross-modal benchmarks, including: VQAv2, MM-Vet, POPE, ST-VQA, OK-VQA, TextVQA, ChartQA, InfoVQA, DocVQA.
  2. CogAgent-18B significantly surpasses existing models on GUI operation datasets, including AITW and Mind2Web.

In addition to all the features already present in CogVLM (visual multi-round dialogue, visual grounding), CogAgent:

  1. Supports higher resolution visual input and dialogue question-answering. It supports ultra-high-resolution image inputs of 1120x1120.
  2. Possesses the capabilities of a visual Agent, being able to return a plan, next action, and specific operations with coordinates for any given task on any GUI screenshot.
  3. Enhanced GUI-related question-answering capabilities, allowing it to handle questions about any GUI screenshot, such as web pages, PC apps, mobile applications, etc.
  4. Enhanced capabilities in OCR-related tasks through improved pre-training and fine-tuning.

Image: img

Models weight in this repository for academic research is free. Users who wish to use the models for commercial purposes must register here. Registered users may use the models for commercial activities free of charge, but must comply with all terms and conditions of this license. The license notice shall be included in all copies or substantial portions of the Software.

Quick Start#

use this python code to get started quickly in cli_demo.py:

import torch
from PIL import Image
from transformers import AutoModelForCausalLM, LlamaTokenizer
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("--quant", choices=[4], type=int, default=None, help='quantization bits')
parser.add_argument("--from_pretrained", type=str, default="THUDM/cogagent-chat-hf", help='pretrained ckpt')
parser.add_argument("--local_tokenizer", type=str, default="lmsys/vicuna-7b-v1.5", help='tokenizer path')
parser.add_argument("--fp16", action="store_true")
parser.add_argument("--bf16", action="store_true")

args = parser.parse_args()
MODEL_PATH = args.from_pretrained
TOKENIZER_PATH = args.local_tokenizer
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'

tokenizer = LlamaTokenizer.from_pretrained(TOKENIZER_PATH)
if args.bf16:
    torch_type = torch.bfloat16
else:
    torch_type = torch.float16

print("========Use torch type as:{} with device:{}========\n\n".format(torch_type, DEVICE))

if args.quant:
    model = AutoModelForCausalLM.from_pretrained(
        MODEL_PATH,
        torch_dtype=torch_type,
        low_cpu_mem_usage=True,
        load_in_4bit=True,
        trust_remote_code=True
    ).eval()
else:
    model = AutoModelForCausalLM.from_pretrained(
        MODEL_PATH,
        torch_dtype=torch_type,
        low_cpu_mem_usage=True,
        load_in_4bit=args.quant is not None,
        trust_remote_code=True
    ).to(DEVICE).eval()

while True:
    image_path = input("image path >>>>> ")
    if image_path == "stop":
        break

    image = Image.open(image_path).convert('RGB')
    history = []
    while True:
        query = input("Human:")
        if query == "clear":
            break
        input_by_model = model.build_conversation_input_ids(tokenizer, query=query, history=history, images=[image])
        inputs = {
            'input_ids': input_by_model['input_ids'].unsqueeze(0).to(DEVICE),
            'token_type_ids': input_by_model['token_type_ids'].unsqueeze(0).to(DEVICE),
            'attention_mask': input_by_model['attention_mask'].unsqueeze(0).to(DEVICE),
            'images': [[input_by_model['images'][0].to(DEVICE).to(torch_type)]],
        }
        if 'cross_images' in input_by_model and input_by_model['cross_images']:
            inputs['cross_images'] = [[input_by_model['cross_images'][0].to(DEVICE).to(torch_type)]]

        # add any transformers params here.
        gen_kwargs = {"max_length": 2048,
                      "temperature": 0.9,
                      "do_sample": False}
        with torch.no_grad():
            outputs = model.generate(**inputs, **gen_kwargs)
            outputs = outputs[:, inputs['input_ids'].shape[1]:]
            response = tokenizer.decode(outputs[0])
            response = response.split("</s>")[0]
            print("\nCog:", response)
        history.append((query, response))

Then run:

python cli_demo_hf.py --bf16

License#

The code in this repository is open source under the Apache-2.0 license, while the use of CogAgent and CogVLM model weights must comply with the Model License.

Citation & Acknowledgements#

If you find our work helpful, please consider citing the following papers

@misc{hong2023cogagent,
      title={CogAgent: A Visual Language Model for GUI Agents}, 
      author={Wenyi Hong and Weihan Wang and Qingsong Lv and Jiazheng Xu and Wenmeng Yu and Junhui Ji and Yan Wang and Zihan Wang and Yuxiao Dong and Ming Ding and Jie Tang},
      year={2023},
      eprint={2312.08914},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

@misc{wang2023cogvlm,
      title={CogVLM: Visual Expert for Pretrained Language Models}, 
      author={Weihan Wang and Qingsong Lv and Wenmeng Yu and Wenyi Hong and Ji Qi and Yan Wang and Junhui Ji and Zhuoyi Yang and Lei Zhao and Xixuan Song and Jiazheng Xu and Bin Xu and Juanzi Li and Yuxiao Dong and Ming Ding and Jie Tang},
      year={2023},
      eprint={2311.03079},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

In the instruction fine-tuning phase of the CogVLM, there are some English image-text data from the MiniGPT-4, LLAVA, LRV-Instruction, LLaVAR and Shikra projects, as well as many classic cross-modal work datasets. We sincerely thank them for their contributions.

Files

18 files ยท 36.6 GBWeights 36.6 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 18 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md7.99 KB1fc24390c3181dd1b125aa96cd882a55d19b37248a3fa309c001d7e01c488684
config.json1.09 KB9f3f84b4f085bf7e59e18794ada57ceff1049c4da3aa8d54bb7e64b82ee238e4
configuration_cogagent.py1.80 KB48d6aae7f24eeb868515773053a363228baf07141adcccf088bf061fbf09ec4f
cross_visual.py32.6 KB01e7f8c84f8179b1bc4e07d0bae4f7b9a4fc8b1d1d0afc6867dca92a7b44e9c0
generation_config.json137 Bd95ad48fd6a88435fcaef08927c1da3fe531afac819f663ecc24c192768e566e
model-00001-of-00008.safetensors4.97 GBc408b956a98c7e9925d6000b6372842aa0f9dc666803ea7fc544a87668ed5194
model-00002-of-00008.safetensors4.98 GBb43fc2b2d06591647ad69980eb442c831488bdbd0f458407afc11fa1e5944762
model-00003-of-00008.safetensors4.98 GB0e8c9dee8e7f7a0b923bd56bac7939d3118a9e50db04cca4145e59a18e008447
model-00004-of-00008.safetensors4.98 GB1b72e64848d71955d7757337727fb2713cde228720df9806f7a530b5af8e2b4c
model-00005-of-00008.safetensors4.98 GB6767d0c1c385e75badba18a0d9d4188e72871c1104fb5fc786573b4cb7378d87
model-00006-of-00008.safetensors4.95 GB0a90a33e6c06ad58a7abc073b555d1a22f573e78b4f4b87a1a252df8a02d3dea
model-00007-of-00008.safetensors4.95 GB8d6eec2f2b61a1eb39dfb7703231639e16394bba2348108f1ed970268abac86e
model-00008-of-00008.safetensors1.78 GB6df8c2486c4d21b20c5b2a72a699b47fd8ac62199ba9ae69db32054ef4fab1a2
model.safetensors.index.json177 KB1a756875b64fc78c79e93b6752d338d72d603ff02d7e02142b101ffda24e88bb
modeling_cogagent.py42.5 KBe7ce0ca019a012d6ef2e3d6ae0da0038b493aa0a4e5e6fd4f436d071214f113b
util.py19.0 KB390811eb63be829b07cd2bdef09bdc31851f93163b24e5a837d16b6757b7e85d
visual.py5.45 KB89b6e9e2a7bfb288e4f9f101bfa8eb2b87b28f7ac8d21a67e782379d40cd3fd0
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
26eec27a44 pinned now2026-11-15 03:49 UTC18 files ยท 36.6 GB

Use it

$ fw get zai-org/cogagent-chat-hf
# manifest sha256 b0ab2015b746… · 36.6 GB · 18 files
$ fw verify ./cogagent-chat-hf zai-org/cogagent-chat-hf
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/zai-org/cogagent-chat-hf.json --dir ./cogagent-chat-hf $ python3 fw.py verify ./cogagent-chat-hf ./zai-org__cogagent-chat-hf.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download zai-org/cogagent-chat-hf --revision 26eec27a44348fbe0c9fad89348cf6a505f5a5ae --local-dir ./cogagent-chat-hf
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("zai-org/cogagent-chat-hf", revision="26eec27a44348fbe0c9fad89348cf6a505f5a5ae") model = AutoModelForCausalLM.from_pretrained("zai-org/cogagent-chat-hf", revision="26eec27a44348fbe0c9fad89348cf6a505f5a5ae", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve zai-org/cogagent-chat-hf --revision 26eec27a44348fbe0c9fad89348cf6a505f5a5ae

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
1fc24390c3181dd1b125aa96cd882a55d19b37248a3fa309c001d7e01c488684
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: zai-org <huggingface.co/zai-org>Newsgroups: alt.freeweights.glmSubject: cogagent-chat-hfDate: 2026-11-15Commit: 26eec27Signed: 2DC28CC7B26A283B ✓
Upstream
zai-org/cogagent-chat-hf
Pinned commit
26eec27a44348fbe0c9fad89348cf6a505f5a5ae
Manifest
cogagent-chat-hf.json ยท .minisig
Manifest sha256
b0ab2015b74655e7af2ba4cffc5747231f95b47bc46c9aa4987daaf731d3f99f
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:49 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/zai-org/cogagent-chat-hf.json $ curl -O https://freeweights.allternit.com/manifests/zai-org/cogagent-chat-hf.json.minisig $ minisign -Vm cogagent-chat-hf.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download zai-org/cogagent-chat-hf
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. cogagent-chat-hf.json. Provenance. Takedown history: none.
From: bartowski <huggingface.co/bartowski>Subject: arcee-ai_GLM-4-32B-Base-32K-GGUF
From: ggml-org <huggingface.co/ggml-org>Subject: AutoGLM-Phone-9B-GGUF
From: zai-org <huggingface.co/zai-org>Subject: CogView3-Plus-3B
From: zai-org <huggingface.co/zai-org>Subject: cogvlm-base-490-hf
From: laion <huggingface.co/laion>Subject: dev_set_part1_10k_glm_4_7_traces_jupiter
From: laion <huggingface.co/laion>Subject: dev_set_part1_10k_glm_4_7_traces_jupiter_cleaned