Dataset Viewer
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
UIPress: Optical Token Compression for UI-to-Code Generation
受 DeepSeek-OCR 光学压缩启发,在 Qwen3-VL-8B 内部训练轻量 Conv 压缩模块, 将 ~6700 visual tokens 压缩到 256,与 VisionZip、EfficientUICoder 等推理时方法公平对比。
快速开始
详细步骤请看 START_HERE.md
# 1. 环境
conda create -n uipress python=3.11 -y && conda activate uipress
pip install -r requirements.txt && playwright install chromium
# 2. Smoke test (单卡)
CUDA_VISIBLE_DEVICES=0 python scripts/train_compressor.py \
--max_samples 20 --epochs 1 --batch_size 1 --grad_accum 1
# 3. 正式训练 (6卡)
torchrun --nproc_per_node=6 scripts/train_compressor.py \
--max_samples 50000 --epochs 5
# 4. 评估
./scripts/run_all_evals.sh 485
4 种压缩方法
| 方法 | 类型 | 需训练 | 脚本 |
|---|---|---|---|
| 分辨率缩放 | Baseline | 否 | eval_all.py --method resolution |
| VisionZip | Token 选择 | 否 | eval_all.py --method visionzip |
| EfficientUICoder 策略 | 元素引导选择 | 否 | eval_all.py --method efficientui |
| UIPress 光学压缩 | 编码端压缩 | 是 | eval_all.py --method uipress |
硬件
| 阶段 | GPU | 时间 |
|---|---|---|
| 训练 | 6×A40 DDP | 8-16h |
| 评估 (全量 485) | 6×A40 并行 | 3-4h |
| CLIP 评分 | 1×A40 | 2h |
- Downloads last month
- 811