Instructions to use seul77/CICA-GLM-4.1V-9B-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seul77/CICA-GLM-4.1V-9B-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="seul77/CICA-GLM-4.1V-9B-Thinking") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("seul77/CICA-GLM-4.1V-9B-Thinking") model = AutoModelForMultimodalLM.from_pretrained("seul77/CICA-GLM-4.1V-9B-Thinking", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use seul77/CICA-GLM-4.1V-9B-Thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "seul77/CICA-GLM-4.1V-9B-Thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seul77/CICA-GLM-4.1V-9B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/seul77/CICA-GLM-4.1V-9B-Thinking
- SGLang
How to use seul77/CICA-GLM-4.1V-9B-Thinking with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "seul77/CICA-GLM-4.1V-9B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seul77/CICA-GLM-4.1V-9B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "seul77/CICA-GLM-4.1V-9B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seul77/CICA-GLM-4.1V-9B-Thinking", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use seul77/CICA-GLM-4.1V-9B-Thinking with Docker Model Runner:
docker model run hf.co/seul77/CICA-GLM-4.1V-9B-Thinking
๐ฟ CICA-GLM-4.1V-9B-Thinking
GLM-4.1V-9B-Thinking trained with cross-image credit assignment (CICA) on ASTERISM-Train, from the paper ASTERISM: Do Multimodal LLMs Actually Look at All the Images?
CICA extends RLVR. For every token of a response, it compares the policy's likelihood under all images with its likelihood under the best single image, and moves credit toward the tokens that need more than one image. It keeps the data, the reward and the RL objective, and adds no parameters, rollouts or backward pass.
Results
| Model | ASTERISM |
|---|---|
| GLM-4.1V-9B-Thinking | 58.7 |
| CICA-GLM-4.1V-9B-Thinking | 61.3 |
The ASTERISM score is the macro average over its seven task categories, with greedy decoding.
Usage
The example needs the accelerate package (pip install accelerate).
from transformers import AutoProcessor, Glm4vForConditionalGeneration
path = "seul77/CICA-GLM-4.1V-9B-Thinking"
processor = AutoProcessor.from_pretrained(path)
model = Glm4vForConditionalGeneration.from_pretrained(path, torch_dtype="auto", device_map="auto")
messages = [{
"role": "user",
"content": [
{"type": "image", "url": "image_1.jpg"},
{"type": "image", "url": "image_2.jpg"},
{"type": "text", "text": "Which image shows the same object from a different side?"},
],
}]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt"
).to(model.device)
out = model.generate(**inputs, max_new_tokens=16384, do_sample=False)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False))
The configuration, tokenizer and processor files are those of GLM-4.1V-9B-Thinking, so generation_config.json keeps its sampling defaults; the ASTERISM scores use greedy decoding, as in the example above. The evaluation code and the prompts used for the ASTERISM numbers are in the GitHub repository (https://github.com/chanseul01/ASTERISM). Training follows Supp. F and G of the paper.
License
MIT, following the base model GLM-4.1V-9B-Thinking.
Citation
@article{asterism,
title = {ASTERISM: Do Multimodal LLMs Actually Look at All the Images?},
author = {Cho, Chanseul and Kim, Dongwoo and Bae, Noori and Moon, Seungjae and Lee, Seongsu and Ro, Youngmin},
journal = {arXiv preprint arXiv:2611.32316},
year = {2026}
}
- Downloads last month
- -