Views
No views yet
xing0916/ARRA-Adapt-MIMIC-7B is trained on the MIMIC-CXR dataset for X-ray generation, as presented in the paper Unleashing the Potential of Large Language Models for Text-to-Image Generation through Autoregressive Representation Alignment.<HYBNEXT> token (enforcing dual local-global constraints)<HYBNEXT>. This token enforces dual constraints: local next-token prediction and global semantic distillation, enabling LLMs to implicitly learn spatial and contextual coherence while retaining their original autoregressive paradigm. Extensive experiments validate ARRA's plug-and-play versatility. When training T2I LLMs from scratch, ARRA reduces FID by 16.6% (ImageNet), 12.0% (LAION-COCO) for autoregressive LLMs like LlamaGen, without modifying original architecture and inference mechanism. For training from text-generation-only LLMs, ARRA reduces FID by 25.5% (MIMIC-CXR), 8.8% (DeepEyeNet) for advanced LLMs like Chameleon. For domain adaptation, ARRA aligns general-purpose LLMs with specialized models (e.g., BioMedCLIP), achieving an 18.6% FID reduction over direct fine-tuning on medical imaging (MIMIC-CXR). These results demonstrate that training objective redesign, rather than architectural modifications, can resolve cross-modal global coherence challenges. ARRA offers a complementary paradigm for advancing autoregressive models.

FlexARInferenceSolver from the ARRA GitHub repository:1import torch
2from PIL import Image
3from arra.models.inference_solver import FlexARInferenceSolver # Requires installing ARRA as a Python package, see GitHub repo
4
5# ******************** Image Generation ********************
6inference_solver = FlexARInferenceSolver(
7 model_path="xing0916/ARRA-Adapt-MIMIC-7B", # This model
8 precision="bf16",
9 target_size=512,
10)
11
12q1 = "PA view chest x-ray image, Mild interstitial pulmonary edema and bilateral pleural effusions, increased on the right."
13
14# generated: tuple of (generated response, list of generated images)
15generated = inference_solver.generate(
16 images=[],
17 qas=[[q1, None]],
18 max_gen_len=8192,
19 temperature=1.0,
20 logits_processor=inference_solver.create_logits_processor(cfg=4.0, image_top_k=2000),
21)
22
23a1, new_image = generated[0], generated[1][0]
24new_image.save("generated_xray.jpg")
25print(f"Generated image saved to generated_xray.jpg")