Downloads · 30 days
82
11% of all-time downloads
SJY-1995/GeoTikzBridge-Base-8B
GeoTikzBridge-Base-8B is a feature extraction model from SJY-1995. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
GeoTikzBridge-Base-8B is a multimodal large language model proposed in the CVPR 2026 accepted paper GeoTikzBridge: Advancing Multimodal Code Generation for Geometric Perception and Reasoning, specializing in geometric…
Downloads · 30 days
82
11% of all-time downloads
All-time downloads
734
Public
Parameters
8.1B
16.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.2 GB · 100%
From the Hugging Face model README
GeoTikzBridge-Base-8B is a multimodal large language model proposed in the CVPR 2026 accepted paper GeoTikzBridge: Advancing Multimodal Code Generation for Geometric Perception and Reasoning, specializing in geometric figure perception and end-to-end TikZ code generation. Built on the InternVL multimodal architecture, this model is fully fine-tuned on the 2.5M-scale GeoTikz-Base dataset, enabling accurate conversion of geometric images into directly compilable, standard-compliant TikZ code, with end-to-end optimization for fine-grained geometric perception, spatial relationship reasoning, and structured code generation.
Install basic dependencies:
pip install transformers torch pillow accelerate
For full training/inference dependencies, please refer to the official project repository: GeoTikzBridge GitHub
Quickly load the model with the Transformers library to achieve end-to-end image-to-TikZ code generation:
from transformers import AutoProcessor, AutoModelForCausalLM
import torch
from PIL import Image
# Load model and processor
model_name = "SJY-1995/GeoTikzBridge-Base-8B"
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto"
)
# Load input geometric image
image = Image.open("your_geometric_figure.png").convert("RGB")
# Build inference prompt
prompt = ""
inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device)
# Generate TikZ code
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=4096,
temperature=0.1,
top_p=0.95,
do_sample=False
)
# Decode and output the generated result
tikz_code = processor.decode(output[0], skip_special_tokens=True)
print("Generated TikZ Code:\n", tikz_code)
The model is fully fine-tuned on the GeoTikz-Base dataset, which contains approximately 2.5 million high-quality geometric image-TikZ code paired samples. The dataset covers full scenarios including basic planar geometric figures, composite figures, nested annotations, and formula integration, building a precise vision-code aligned corpus.
Dataset Link: SJY-1995/GeoTikz-Base
| Hyperparameter | Configuration |
|---|---|
| Global Batch Size | 128 |
| Peak Learning Rate | 4e-7 |
| Training Epochs | 3 |
| Max Sequence Length | 12800 |
| Training Precision | BF16 |
Model training is implemented based on the official InternVL training framework. The core fine-tuning scripts and complete training pipeline can be found in the project repository:
./internvl_chat/shell/internvl2.0/2nd_finetune/internvl2_8b_internlm2_7b_dynamic_res_2nd_finetune_full.shThe GeoTikzBridge series includes multiple models with different specifications and capabilities to adapt to various scenario requirements:
| Model Name | Parameter Size | Core Capability | Model Link |
|---|---|---|---|
| GeoTikzBridge-Base-8B | 8B | Basic geometric image-to-TikZ code generation | 🤗 Hugging Face |
| GeoTikzBridge-Base-38B | 38B | High-precision TikZ code generation for complex geometric figures | 🤗 Hugging Face |
| GeoTikzBridge-Instruct-8B | 8B | Instruction following, auxiliary line generation, interactive geometric reasoning | 🤗 Hugging Face |
If you use this model, related datasets or code in your research or projects, please cite the following paper:
@inproceedings{
geotikzbridge,
title={GeoTikzBridge: Advancing Multimodal Code Generation for Geometric Perception and Reasoning},
author={Jiayin Sun and Caixia Sun and Boyu Yang and Hailin Li and Xiao Chen and Yi Zhang and Errui Ding and Liang Li and Chao Deng and Junlan Feng},
booktitle={2026 IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2026}
}