THUDM / glm-edge-v-2b

huggingface.co
Total runs: 3.3K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: January 02 2025
image-text-to-text

Introduction of glm-edge-v-2b

Model Details of glm-edge-v-2b

GLM-Edge-V-2B

中文阅读, 点击 这里

Inference with Transformers
Installation

Install the transformers library from the source code:

pip install git+https://github.com/huggingface/transformers.git
Inference
import torch
from PIL import Image
from transformers import (
    AutoTokenizer,
    AutoImageProcessor,
    AutoModelForCausalLM,
)

url = "img.png"
messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "describe this image"}]}]
image = Image.open(url)

model_dir = "THUDM/glm-edge-v-5b"

processor = AutoImageProcessor.from_pretrained(model_dir, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_dir,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)

inputs = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True, return_dict=True, tokenize=True, return_tensors="pt"
).to(next(model.parameters()).device)

generate_kwargs = {
    **inputs,
    "pixel_values": torch.tensor(processor(image).pixel_values).to(next(model.parameters()).device),
}
output = model.generate(**generate_kwargs, max_new_tokens=100)
print(tokenizer.decode(output[0][len(inputs["input_ids"][0]):], skip_special_tokens=True))
License

The usage of this model’s weights is subject to the terms outlined in the LICENSE .

Runs of THUDM glm-edge-v-2b on huggingface.co

3.3K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About glm-edge-v-2b huggingface.co Model

More glm-edge-v-2b license Visit here:

https://choosealicense.com/licenses/glm-4

glm-edge-v-2b huggingface.co

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

glm-edge-v-2b huggingface.co Url

https://huggingface.co/THUDM/glm-edge-v-2b

THUDM glm-edge-v-2b online free

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

THUDM glm-edge-v-2b online free url in huggingface.co:

https://huggingface.co/THUDM/glm-edge-v-2b

glm-edge-v-2b install

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

glm-edge-v-2b install url in huggingface.co:

https://huggingface.co/THUDM/glm-edge-v-2b

Url of glm-edge-v-2b

glm-edge-v-2b huggingface.co Url

Provider of glm-edge-v-2b huggingface.co

THUDM
ORGANIZATIONS

Other API from THUDM

huggingface.co

Total runs: 659.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2024
huggingface.co

Total runs: 611.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 243.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 11 2025
huggingface.co

Total runs: 95.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2025
huggingface.co

Total runs: 69.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 28.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 03 2025
huggingface.co

Total runs: 23.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 15.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 14 2025
huggingface.co

Total runs: 6.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 19 2023
huggingface.co

Total runs: 6.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2024
huggingface.co

Total runs: 4.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 22 2025
huggingface.co

Total runs: 2.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 993
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 928
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 853
Run Growth: 0
Growth Rate: 0.00%
Updated:January 27 2025
huggingface.co

Total runs: 607
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 299
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 188
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 167
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 119
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2024
huggingface.co

Total runs: 75
Run Growth: 0
Growth Rate: 0.00%
Updated:November 20 2023
huggingface.co

Total runs: 62
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 28
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 25
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 14
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:July 22 2024