/ Модель

Характеристики

Контекст
4 096 токенов
Размер весов
33,9 ГБ
Архитектура
detikzify · dense
Библиотека
transformers
Опубликована
28 ноя 2024

detikzify-v2-8b

Генерация текстаТекст → текст3 профессии

Мультимодальная модель DeTikZifyv2 преобразует наброски и научные иллюстрации в редактируемые программы на Ti*k*Z с сохранением их смысла.

4 525скачиваний за 30 дней15лайковвеса обновлены17 мар 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

DeTikZifyv2 (8b) — мультимодальная модель проекта DeTikZify, которая преобразует наброски и существующие научные иллюстрации в редактируемые программы на Ti*k*Z, стараясь сохранять их смысл. Модель сочетает языковую основу LLaMA 3.1 8B с визуальным энкодером SigLIP из PaliGemmaMix-448 (3B); энкодер дообучен вместе с остальной моделью. Для обработки изображений используется разрешение 420×420 пикселей.

Модель предназначена для восстановления и редактирования научной графики через генерацию кода Ti*k*Z. В версии 2 для предварительного обучения использованы пары рисунок–подпись–OCR из ArXivCap, а для дообучения — набор DaTi*k*Zv3 с более чем 450 тысячами рисунков Ti*k*Z. В README приведено сравнение с предыдущими моделями, но таблица результатов опущена, поэтому конкретные показатели качества оценить нельзя. Карточка не сообщает лицензию; её условия следует проверить отдельно перед использованием.

Сценарии применения

  • Преобразование наброска в код Ti*k*Z
  • Восстановление редактируемой диаграммы по научной иллюстрации
  • Перерисовка опубликованного графика в виде программы Ti*k*Z

Ограничения

В README не приведены численные результаты оценки, поэтому качество для конкретных типов рисунков по представленным данным определить нельзя. Условия лицензии в карточке не указаны.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card for DeTikZifyv2 (8b)

DeTikZifyv2 (8b) is a multimodal language model that automatically converts sketches and existing scientific figures into editable, semantics-preserving TikZ graphics programs. It is based on LLaMA3.1 (8b) and the SigLIP vision encoder of PaliGemmaMix-448 (3b). Check out the DeTikZify project for more information and tips on how to best run the model.

Usage

from operator import itemgetter

from detikzify.model import load
from detikzify.infer import DetikzifyPipeline

image = "https://w.wiki/A7Cc"
pipeline = DetikzifyPipeline(*load(
    model_name_or_path="nllg/detikzify-v2-8b",
    device_map="auto",
    torch_dtype="bfloat16",
))

# generate a single TikZ program
fig = pipeline.sample(image=image)

# if it compiles, rasterize it and show it
if fig.is_rasterizable:
    fig.rasterize().show()

# run MCTS for 10 minutes and generate multiple TikZ programs
figs = set()
for score, fig in pipeline.simulate(image=image, timeout=600):
    figs.add((score, fig))

# save the best TikZ program
best = sorted(figs, key=itemgetter(0))[-1][1]
best.save("fig.tex")

Changes from DeTikZifyv1

We document all changes between DeTikZifyv1 and DeTikZifyv2 in our paper, "TikZero: Zero-Shot Text-Guided Graphics Program Synthesis". For convenience, they are also listed below.

Architecture

Similar to DeTikZifyv1, DeTikZifyv2 uses a SigLIP vision encoder. However, inspired by the continued ViT pretraining of InternVL, we initialize the weights with the fine-tuned vision encoder of PaliGemmaMix-448 (3b) and increase DeTikZify's resolution to 420x420 pixels. Further, the vision encoder is no longer kept frozen but fully fine-tuned with the rest of the model.

Training Data

For pretraining, we switch from MetaFig to the much larger ArXivCap dataset and extract 1 million (figure, caption, OCR) tuples for pretraining the modality connector. For fine-tuning, we create the new DaTikZv3 dataset with over 450k TikZ drawings.

We also train a new model called UltraSketch to generate synthetic sketches during training. It is based on UltraEdit and achieves a congruence coefficient (CC) of 0.74. Additionally, we generate synthetic sketches using image transformation. While these sketches are less diverse, they are better at preserving text rendering, achieving a similar CC of 0.75. When we average the sketch representations produced by both methods, the resulting CC increases to 0.82, indicating that the methods are orthogonal and complement each other effectively.

Training & Inference

We observe improved performance by extending the training to 5 epochs and increasing the learning rate to 5e-5. Fully fine-tuning the vision encoder means that we can no longer compute SelfSim as the cosine similarity between pooled outputs during inference, as the pooling head is not fine-tuned. However, by instead computing Earth Mover's Distance on the fine-tuned patch embeddings, it actually enhances the correlation with human judgments (0.456 segment-level and 0.911 system-level correlation). This means that DeTikZifyv2 also works well with our MCTS-based inference algorithm.

Evaluation

Here is how DeTikZifyv2 (8b) compares to DeTikZifyDS (7b), previously the best performing DeTikZify model, as evaluated on the test split of DaTikZv3. Scores are multiplied by 100.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Архитектура detikzify неизвестна transformers в образе рантайма.

Класс архитектуры
DetikzifyForConditionalGeneration
Ревизия весов
e73e2fd

0 моделей