Skip to content
Other

UniSTEM

мультимодальная модель для электронной микроскопии

2 min readupdated

UniSTEM — это специализированная мультимодальная модель на 14,61 млрд параметров для анализа и обработки снимков сканирующей и просвечивающей электронной микроскопии (SEM и TEM). Модель адаптирована на базе архитектуры BAGEL-7B-MoT (смесь трансформеров — Mixture-of-Transformers с энкодером SigLIP и языковой частью Qwen2) и объединяет две башни: одна отвечает за понимание изображения и выдачу структурированного текста, а вторая — за генерацию картинок (image-to-image). Благодаря этому одна нейросеть умеет и находить дефекты кристаллической решётки, и восстанавливать зашумлённые микрофотографии. Разработка пригодится исследователям в области материаловедения, физики твёрдого тела и нанотехнологий.

Ключевые особенности

  • Два режима в одной модели: объединяет задачи понимания (U1–U4) и генерации изображений (G1–G2) в едином чекпоинте.
  • Двойной выход за один проход: задачи G1 и U4 работают как две головы одного прогона — модель одновременно строит карту поля DPC и выдаёт JSON со скалярными параметрами.
  • Поэтапное обучение и слияние: башни обучались отдельно (сначала эксперты под задачи, затем дистилляция MOPD), после чего лучшие версии объединили в итоговую модель.
  • Полный комплект весов: репозиторий содержит не только дообученные веса в точности fp32, но и конфиги, токенизатор Qwen2 и весы VAE-автоэнкодера.

Что можно сделать

  • Очистка микрофотографий (G2): подавать зашумлённые снимки (с пуассоновским шумом) и получать очищенные изображения, в том числе в связке noisy -> denoise -> task перед дальнейшим анализом.
  • Реконструкция полей и расчёт параметров (G1 + U4): восстанавливать нормализованное поле направлений DPC из снимков STEM и сразу получать физические величины (sigma_p, sigma_n, DPC_Mmax и др.).
  • Поиск дефектов и анализ структуры (U1–U3): автоматически определять точечные дефекты (вакансии), координаты дислокаций, а также кристаллическую решётку, химическую формулу и ориентацию.

Пример

git clone [https://github.com/leonardokong486/UniSTEM](https://github.com/leonardokong486/UniSTEM) UniSTEM-release
cd UniSTEM-release
huggingface-cli download LeonardoKong/UniSTEM --local-dir ./model/UniSTEM
export BAGEL_ROOT=./model/BAGEL
export MODEL_PATH=$PWD/model/UniSTEM
export CHECKPOINT=$PWD/model/UniSTEM
bash scripts/probe_runtime.sh
bash scripts/submit_rjob.sh smoke
ПодробнееАрхитектура: BAGEL-7B-MoT (Qwen2 MoT LLM + SigLIP + VAE), общий размер весов — 14,61B параметров в формате fp32.
Код оценки и бенчмарк выложены отдельно в репозитории leonardokong486/UniSTEM на GitHub.
Лицензия: кастомная исследовательская / некоммерческая (на базе Apache-2.0 от BAGEL-7B-MoT).
Discuss Telegram 0

Will it run?

Runs in FP8 / INT8

Full precision does not fit, a quantised version does: quality barely changes down to 8 bits, more noticeably at 4 bits.

  • F32weights 54 GB · ready files60 GB
  • BF16weights 27 GB30 GB
  • FP8 / INT8recommendedweights 14 GB15 GB
  • 4-bitweights 7.7 GB8.9 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 5080

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # LeonardoKong/UniSTEM
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download LeonardoKong/UniSTEM --local-dir ~/models/UniSTEM
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to UniSTEM
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b42from December 2, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

  1. Qwen2.5-7Bfamily root
  2. Qwen2.5-7B-Instruct
  3. BAGEL-7B-MoT
  4. UniSTEM

New posts about versions of Qwen2.5-7B (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 12All on Hugging Face
LoRAs and adapters 1All on Hugging Face
Merges 5All on Hugging Face

About the model

LeonardoKong/UniSTEM
Author
LeonardoKong
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments