dnagpt / OmniGene-4-MM-LoRA

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 04 2026
image-text-to-text

Introduction of OmniGene-4-MM-LoRA

Model Details of OmniGene-4-MM-LoRA

OmniGene-4-MM (Stage 3 v3, LoRA + embedding)

Multi-modal extension of OmniGene-4 v5 that adds four vision modalities (chemical-structure images, medical / pathology imagery, charts) on top of the v5 sequence + language capability.

This repository hosts the LoRA adapter + extended embedding (~1.7 GB). You need to first load the base model dnagpt/OmniGene-4-SFT-v5-merged and then patch it with the artefacts here. A merged BF16 release is forthcoming as dnagpt/OmniGene-4-MM-merged .

Headline numbers
Capability Stage 3 v3 v5 (text-only)
BioPAWS standard homology 85.0 % 99.4 %
BioPAWS remote homology 69.5 % 82.6 %
Vis-CheBI20 struct_recog 1.00
Vis-CheBI20 struct_cap 0.96
Cell-marker → cell-type ID (kw-overlap) 0.95
SMILES → physicochem descriptor (kw-overlap) 0.91
Protein-pair homology generation (kw-overlap) 1.00
Total compute ~1.5 GPU-days (single H20) 1.5 GPU-days
Files
File Size What it is
lora_weights.pt 160 MB LoRA adapter state-dict (r=64, α=128, on q/k/v/o, gate/up/down, router.proj)
embedding_weights.pt 1.6 GB Extended embedding table (290,172 × 2,816, BF16)
tokenizer.json + tokenizer_config.json 37 MB Tokenizer with 28,028 biological tokens
processor_config.json 2 KB Multimodal processor configuration
chat_template.jinja 16 KB Chat template
meta.json 0.3 KB Training hyperparameters
Loading
import torch
from transformers import AutoTokenizer, AutoProcessor, AutoModelForCausalLM
from peft import LoraConfig, inject_adapter_in_model
from huggingface_hub import hf_hub_download

# 1. Load base
BASE = "dnagpt/OmniGene-4-SFT-v5-merged"
ADAPTER = "dnagpt/OmniGene-4-MM-LoRA"

tok = AutoTokenizer.from_pretrained(ADAPTER)
proc = AutoProcessor.from_pretrained(ADAPTER)
model = AutoModelForCausalLM.from_pretrained(
    BASE, torch_dtype=torch.bfloat16, device_map="auto",
)

# 2. Inject empty LoRA at the same target modules used during training
lora_cfg = LoraConfig(
    r=64, lora_alpha=128, lora_dropout=0.05, bias="none",
    target_modules=['q_proj','k_proj','v_proj','o_proj',
                    'gate_proj','up_proj','down_proj','router.proj'],
)
inject_adapter_in_model(lora_cfg, model.model.language_model, adapter_name="stage2")

# 3. Patch in trained weights
sd = model.state_dict()
for k, v in torch.load(hf_hub_download(ADAPTER, "lora_weights.pt"), map_location="cpu").items():
    if k in sd: sd[k].copy_(v)
emb = torch.load(hf_hub_download(ADAPTER, "embedding_weights.pt"), map_location="cpu")
model.get_input_embeddings().weight.data.copy_(emb)
model.eval()
Multi-modal usage
from PIL import Image

img = Image.open("molecule.png").convert("RGB")
msgs = [{"role": "user", "content": [
    {"type": "image"},
    {"type": "text", "text": "Please list the functional groups of the molecule."},
]}]
text = proc.apply_chat_template(msgs, add_generation_prompt=True, tokenize=False)
inp = proc(text=text, images=[img], return_tensors="pt").to(model.device)

out = model.generate(**inp, max_new_tokens=160, do_sample=False)
print(tok.decode(out[0][inp.input_ids.shape[1]:], skip_special_tokens=True))
Training pipeline

Three-stage LoRA fine-tuning starting from the v5 merged checkpoint:

  1. Stage 1 (~0.4 GPU-days): vision-only warmup, 10K steps, LR 5e-5
  2. Stage 2 (~1.0 GPU-days): mixed text + vision, 6K steps, LR 5e-6
  3. Stage 3 v3 (~0.5 GPU-days): heavy-homology with frozen embedding, 3K steps, LR 2e-5

See scripts in the GitHub repository for complete reproducibility.

Citation
@article{wang2026omnigene4,
  title  = {OmniGene-4: A Unified Bio-Language MoE Model with Router-Level
            Interpretability and Modality-Invariant Transfer},
  author = {Wang, Liang},
  year   = {2026},
  note   = {Manuscript at Patterns (Cell Press). Preprint:
            bioRxiv 10.1101/2026.01.03.697478. Code:
            https://github.com/maris205/omnigene4}
}
License

Code: MIT (see GitHub). Model weights: Apache 2.0 (inherited from Gemma-4 base).

Runs of dnagpt OmniGene-4-MM-LoRA on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About OmniGene-4-MM-LoRA huggingface.co Model

More OmniGene-4-MM-LoRA license Visit here:

https://choosealicense.com/licenses/apache-2.0

OmniGene-4-MM-LoRA huggingface.co

OmniGene-4-MM-LoRA huggingface.co is an AI model on huggingface.co that provides OmniGene-4-MM-LoRA's model effect (), which can be used instantly with this dnagpt OmniGene-4-MM-LoRA model. huggingface.co supports a free trial of the OmniGene-4-MM-LoRA model, and also provides paid use of the OmniGene-4-MM-LoRA. Support call OmniGene-4-MM-LoRA model through api, including Node.js, Python, http.

OmniGene-4-MM-LoRA huggingface.co Url

https://huggingface.co/dnagpt/OmniGene-4-MM-LoRA

dnagpt OmniGene-4-MM-LoRA online free

OmniGene-4-MM-LoRA huggingface.co is an online trial and call api platform, which integrates OmniGene-4-MM-LoRA's modeling effects, including api services, and provides a free online trial of OmniGene-4-MM-LoRA, you can try OmniGene-4-MM-LoRA online for free by clicking the link below.

dnagpt OmniGene-4-MM-LoRA online free url in huggingface.co:

https://huggingface.co/dnagpt/OmniGene-4-MM-LoRA

OmniGene-4-MM-LoRA install

OmniGene-4-MM-LoRA is an open source model from GitHub that offers a free installation service, and any user can find OmniGene-4-MM-LoRA on GitHub to install. At the same time, huggingface.co provides the effect of OmniGene-4-MM-LoRA install, users can directly use OmniGene-4-MM-LoRA installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

OmniGene-4-MM-LoRA install url in huggingface.co:

https://huggingface.co/dnagpt/OmniGene-4-MM-LoRA

Url of OmniGene-4-MM-LoRA

OmniGene-4-MM-LoRA huggingface.co Url

Provider of OmniGene-4-MM-LoRA huggingface.co

dnagpt
ORGANIZATIONS

Other API from dnagpt

huggingface.co

Total runs: 45
Run Growth: -72
Growth Rate: -160.00%
Updated:August 06 2023
huggingface.co

Total runs: 35
Run Growth: 27
Growth Rate: 77.14%
Updated:February 18 2025
huggingface.co

Total runs: 26
Run Growth: 19
Growth Rate: 73.08%
Updated:October 31 2024
huggingface.co

Total runs: 23
Run Growth: 17
Growth Rate: 73.91%
Updated:December 30 2024
huggingface.co

Total runs: 20
Run Growth: 13
Growth Rate: 65.00%
Updated:October 19 2024
huggingface.co

Total runs: 12
Run Growth: 7
Growth Rate: 58.33%
Updated:January 03 2025
huggingface.co

Total runs: 12
Run Growth: 5
Growth Rate: 41.67%
Updated:February 11 2025
huggingface.co

Total runs: 12
Run Growth: 6
Growth Rate: 50.00%
Updated:January 03 2025
huggingface.co

Total runs: 12
Run Growth: 5
Growth Rate: 41.67%
Updated:November 30 2024
huggingface.co

Total runs: 11
Run Growth: 6
Growth Rate: 54.55%
Updated:September 19 2025
huggingface.co

Total runs: 10
Run Growth: 4
Growth Rate: 40.00%
Updated:November 30 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 20 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 05 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 04 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 12 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 24 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 03 2025