PathMMU: A Massive Multimodal Expert-Level Benchmark for Understanding and Reasoning in Pathology
On the map: Multimodal LLMs / vision-language models → Medical vision-language models
Abstract (arXiv)
The emergence of large multimodal models has unlocked remarkable potential in AI, particularly in pathology. However, the lack of specialized, high-quality benchmark impeded their development and precise evaluation. To address this, we introduce PathMMU, the largest and highest-quality expert-validated pathology benchmark for Large Multimodal Models (LMMs). It comprises 33,428 multimodal multi-choice questions and 24,067 images from various sources, each accompanied by an explanation for the correct answer. The construction of PathMMU harnesses GPT-4V's advanced capabilities, utilizing over 30,000 image-caption pairs to enrich captions and generate corresponding Q&As in a cascading process. Significantly, to maximize PathMMU's authority, we invite seven pathologists to scrutinize each question under strict standards in PathMMU's validation and test sets, while simultaneously setting an expert-level performance benchmark for PathMMU. We conduct extensive evaluations, including zero-shot assessments of 14 open-sourced and 4 closed-sourced LMMs and their robustness to image corruption. We also fine-tune representative LMMs to assess their adaptability to PathMMU. The empirical findings indicate that advanced LMMs struggle with the challenging PathMMU benchmark, with the top-performing LMM, GPT-4V, achieving only a 49.8% zero-shot performance, significantly lower than the 71.8% demonstrated by human pathologists. After fine-tuning, significantly smaller open-sourced LMMs can outperform GPT-4V but still fall short of the expertise shown by pathologists. We hope that the PathMMU will offer valuable insights and foster the development of more specialized, next-generation LMMs for pathology.
Key facts. Cited by 43 papers in the map (data through 7 Oct 2026). Placed in Medical vision-language models, one of 16 directions in Multimodal LLMs / vision-language models. Builds on 41 of its 58 references that are in the map. First posted on arXiv 29 Jan 2024.
Builds on
41 of 58 references.
Closest ancestors · 1
Same direction, newest first
Other references · 40
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Visual Instruction Tuningcited by 7,792
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,069
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
- 2022A ConvNet for the 2020scited by 3,545
- 2023InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuningcited by 2,855
- 2023MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Modelscited by 2,689
- 2023MMBench: Is Your Multi-modal Model an All-around Player?cited by 2,105
28 more
- 2023MMMU: A Massive Multi-discipline Multimodal Understanding and Reasoning Benchmark for Expert AGIcited by 2,044
- 2023PaLM-E: An Embodied Multimodal Language Modelcited by 2,037
- 2023MM-Vet: Evaluating Large Multimodal Models for Integrated Capabilitiescited by 1,221
- 2023Kosmos-2: Grounding Multimodal Large Language Models to the Worldcited by 1,075
- 2020Domain-Specific Language Model Pretraining for Biomedical Natural Language Processingcited by 996
- 2023SEED-Bench: Benchmarking Multimodal LLMs with Generative Comprehensioncited by 929
- 2023CogVLM: Visual Expert for Pretrained Language Modelscited by 704
- 2023LLaMA-Adapter V2: Parameter-Efficient Visual Instruction Modelcited by 602
- 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Modelscited by 572
- 2023Otter: A Multi-Modal Model with In-Context Instruction Tuningcited by 548
- 2020PathVQA: 30000+ Questions for Medical Visual Question Answeringcited by 467
- 2018Rotation Equivariant CNNs for Digital Pathologycited by 420
- 2023PMC-VQA: Visual Instruction Tuning for Medical Visual Question Answeringcited by 333
- 2022YOLOv6: A Single-Stage Object Detection Framework for Industrial Applicationscited by 273
- 2021ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generationcited by 258
- 2023LVLM-eHub: A Comprehensive Evaluation Benchmark for Large Vision-Language Modelscited by 217
- 2023Quilt-1M: One Million Image-Text Pairs for Histopathologycited by 192
- 2023LAMM: Language-Assisted Multi-Modal Instruction-Tuning Dataset, Framework, and Benchmarkcited by 169
- 2018BACH: Grand Challenge on Breast Cancer Histology Imagescited by 131
- 2023Evaluation and Analysis of Hallucination in Large Vision-Language Modelscited by 99
- 2019Lung and Colon Cancer Histopathological Image Dataset (LC25000)cited by 86
- 2023Quilt-LLaVA: Visual Instruction Tuning by Extracting Localized Narratives from Open-Source Histopathology Videoscited by 84
- 2021Going Deeper through the Gleason Scoring Scale: An Automatic end-to-end System for Histology Prostate Grading and Cribriform Pattern Detectioncited by 66
- 2021A Petri Dish for Histopathology Image Analysiscited by 63
- 2023BenchLMM: Benchmarking Cross-style Visual Capability of Large Multimodal Modelscited by 41
- 2022WSSS4LUAD: Grand Challenge on Weakly-supervised Tissue Semantic Segmentation for Lung Adenocarcinomacited by 32
- 2022Benchmarking the Robustness of Deep Neural Networks to Common Corruptions in Digital Pathologycited by 26
- 2024Benchmarking PathCLIP for Pathology Image Analysiscited by 6
Built on by
Citing papers per year: 2024: 6; 2025: 19; 2026: 18.
43 papers.
Sort:
By area:
- 2024GMAI-MMBench: A Comprehensive Multimodal Evaluation Benchmark Towards General Medical AIcited by 96
- 2024PathAlign: A vision-language model for whole slide images in histopathologycited by 29
- 2024PathGen-1.6M: 1.6 Million Pathology Image-text Pairs Generation through Multi-agent Collaborationcited by 28
- 2025Holistic Evaluation of Multimodal LLMs on Spatial Intelligencecited by 28
- 2025CPathAgent: An Agent-based Foundation Model for Interpretable High-Resolution Pathology Image Analysis Mimicking Pathologists' Diagnostic Logiccited by 27
- 2025Evidence-based diagnostic reasoning with multi-agent copilot for human pathologycited by 26
- 2025Towards Better Dental AI: A Multimodal Benchmark and Instruction Dataset for Panoramic X-ray Analysiscited by 16
- 2025Patho-AgenticRAG: Towards Multimodal Agentic Retrieval-Augmented Generation for Pathology VLMs via Reinforcement Learningcited by 13
- 2025A Versatile Pathology Co-pilot via Reasoning Enhanced Multimodal Large Language Modelcited by 12
- 2025DrVD-Bench: Do Vision-Language Models Reason Like Human Doctors in Medical Image Diagnosis?cited by 10
- 2024A New Era in Computational Pathology: A Survey on Foundation and Vision-Language Modelscited by 9
- 2025Multi-Modal Foundation Models for Computational Pathology: A Surveycited by 9
31 more
- 2025Navigating Gigapixel Pathology Images with Large Multimodal Modelscited by 7
- 2024MedMax: Mixed-Modal Instruction Tuning for Training Biomedical Assistantscited by 6
- 2025Content Generation Models in Computational Pathology: A Comprehensive Survey on Methods, Applications, and Challengescited by 5
- 2025TeamPath: Building MultiModal Pathology Experts with Reasoning AI Copilotscited by 5
- 2026PathNavigate: A Training-Free Pathology Agent with Surprise-Guided Scan and Shared Slide Memory for Whole-Slide Image VQAcited by 5
- 2025Discovering Pathology Rationale and Token Allocation for Efficient Multimodal Pathology Reasoningcited by 4
- 2025MDK12-Bench: A Comprehensive Evaluation of Multimodal Large Language Models on Multidisciplinary Examscited by 4
- 2026Instance-Aligned Captions for Explainable Video Anomaly Detectioncited by 4
- 2025Beyond Pixel Simulation: Pathology Image Generation via Diagnostic Semantic Tokens and Prototype Controlcited by 3
- 2026Enhancing Pathological VLMs with Cross-scale Reasoningcited by 3
- 2025Histopathology Multi-modal Embedding for Pathology Composed Retrievalcited by 2
- 2025PathVG: A New Benchmark and Dataset for Pathology Visual Groundingcited by 2
- 2025Domain Specific Benchmarks for Evaluating Multimodal Large Language Modelscited by 2
- 2026LAMMI-Pathology: A Tool-Centric Bottom-Up LVLM-Agent Framework for Molecularly Informed Medical Intelligence in Pathologycited by 2
- 2026Benchmarking PhD-Level Coding in 3D Geometric Computer Visioncited by 2
- 2026Do Pathology Vision-Language Models Truly See Pathology?cited by 2
- 2025HeteroRAG: A Heterogeneous Retrieval-Augmented Generation Framework for Medical Vision Language Taskscited by 1
- 2026ReinPath: A Multimodal Reinforcement Learning Approach for Pathologycited by 1
- 2026PathMem: Toward Cognition-Aligned Memory Transformation for Pathology MLLMscited by 1
- 2026Beyond a Single Frame: Multi-Frame Spatially Grounded Reasoning Across Volumetric MRIcited by 1
- 2026Aloe-Vision: Robust Vision-Language Models for Healthcarecited by 1
- 2026Agentic Visual Reasoning in Whole-Slide Pathology Images via Active Perceptioncited by 1
- 2024Efficient and Comprehensive Feature Extraction in Large Vision-Language Model for Pathology Analysiscited by 0
- 2025MedGEN-Bench: A Contextually Entangled Benchmark for Open-ended Multimodal Medical Generationcited by 0
- 2026PathGLS: Evaluating Pathology Vision-Language Models without Ground Truth through Multi-Dimensional Consistencycited by 0
- 2026A Generative Foundation Model for Multimodal Histopathologycited by 0
- 2026PBSBench: A Multi-Level Vision-Language Framework and Benchmark for Hematopathology Whole Slide Image Interpretationcited by 0
- 2026What Transfers from Text to Vision? Capability Scaling Laws and Transfer Dynamics for VLMscited by 0
- 2026From Multi-Resolution Cells to Gigapixel Whole Slide Images Foundation Model for Computational Pathologycited by 0
- 2026VIPER: An Expert-Curated Benchmark for Vision-Language Models in Veterinary Pathologycited by 0
- 2026See, Measure, and Reason: Learning Visually Grounded Reasoning in Pathologycited by 0
- 2026See, Measure, and Reason: Learning Visually Grounded Reasoning in Pathology28 Sep 2026
- 2026VIPER: An Expert-Curated Benchmark for Vision-Language Models in Veterinary Pathology26 Aug 2026
- 2026Agentic Visual Reasoning in Whole-Slide Pathology Images via Active Perception9 Aug 2026
- 2026From Multi-Resolution Cells to Gigapixel Whole Slide Images Foundation Model for Computational Pathology4 Aug 2026
- 2026Do Pathology Vision-Language Models Truly See Pathology?23 Jul 2026
- 2026Aloe-Vision: Robust Vision-Language Models for Healthcare25 Jun 2026
- 2026What Transfers from Text to Vision? Capability Scaling Laws and Transfer Dynamics for VLMs24 Jun 2026
- 2026Enhancing Pathological VLMs with Cross-scale Reasoning16 Jun 2026
- 2026PathNavigate: A Training-Free Pathology Agent with Surprise-Guided Scan and Shared Slide Memory for Whole-Slide Image VQA22 May 2026
- 2026PBSBench: A Multi-Level Vision-Language Framework and Benchmark for Hematopathology Whole Slide Image Interpretation19 Apr 2026
- 2026Beyond a Single Frame: Multi-Frame Spatially Grounded Reasoning Across Volumetric MRI17 Apr 2026
- 2026A Generative Foundation Model for Multimodal Histopathology4 Apr 2026
31 more
- 2026Benchmarking PhD-Level Coding in 3D Geometric Computer Vision31 Mar 2026
- 2026PathGLS: Evaluating Pathology Vision-Language Models without Ground Truth through Multi-Dimensional Consistency17 Mar 2026
- 2026PathMem: Toward Cognition-Aligned Memory Transformation for Pathology MLLMs10 Mar 2026
- 2026LAMMI-Pathology: A Tool-Centric Bottom-Up LVLM-Agent Framework for Molecularly Informed Medical Intelligence in Pathology21 Feb 2026
- 2026ReinPath: A Multimodal Reinforcement Learning Approach for Pathology21 Jan 2026
- 2026Instance-Aligned Captions for Explainable Video Anomaly Detection13 Jan 2026
- 2025Beyond Pixel Simulation: Pathology Image Generation via Diagnostic Semantic Tokens and Prototype Control24 Dec 2025
- 2025Navigating Gigapixel Pathology Images with Large Multimodal Models24 Nov 2025
- 2025TeamPath: Building MultiModal Pathology Experts with Reasoning AI Copilots20 Nov 2025
- 2025MedGEN-Bench: A Contextually Entangled Benchmark for Open-ended Multimodal Medical Generation17 Nov 2025
- 2025Towards Better Dental AI: A Multimodal Benchmark and Instruction Dataset for Panoramic X-ray Analysis11 Sep 2025
- 2025Holistic Evaluation of Multimodal LLMs on Spatial Intelligence18 Aug 2025
- 2025HeteroRAG: A Heterogeneous Retrieval-Augmented Generation Framework for Medical Vision Language Tasks18 Aug 2025
- 2025MDK12-Bench: A Comprehensive Evaluation of Multimodal Large Language Models on Multidisciplinary Exams9 Aug 2025
- 2025Patho-AgenticRAG: Towards Multimodal Agentic Retrieval-Augmented Generation for Pathology VLMs via Reinforcement Learning4 Aug 2025
- 2025A Versatile Pathology Co-pilot via Reasoning Enhanced Multimodal Large Language Model23 Jul 2025
- 2025Evidence-based diagnostic reasoning with multi-agent copilot for human pathology26 Jun 2025
- 2025Domain Specific Benchmarks for Evaluating Multimodal Large Language Models15 Jun 2025
- 2025DrVD-Bench: Do Vision-Language Models Reason Like Human Doctors in Medical Image Diagnosis?30 May 2025
- 2025CPathAgent: An Agent-based Foundation Model for Interpretable High-Resolution Pathology Image Analysis Mimicking Pathologists' Diagnostic Logic26 May 2025
- 2025Discovering Pathology Rationale and Token Allocation for Efficient Multimodal Pathology Reasoning21 May 2025
- 2025Content Generation Models in Computational Pathology: A Comprehensive Survey on Methods, Applications, and Challenges16 May 2025
- 2025Multi-Modal Foundation Models for Computational Pathology: A Survey12 Mar 2025
- 2025PathVG: A New Benchmark and Dataset for Pathology Visual Grounding28 Feb 2025
- 2025Histopathology Multi-modal Embedding for Pathology Composed Retrieval11 Feb 2025
- 2024MedMax: Mixed-Modal Instruction Tuning for Training Biomedical Assistants17 Dec 2024
- 2024Efficient and Comprehensive Feature Extraction in Large Vision-Language Model for Pathology Analysis12 Dec 2024
- 2024A New Era in Computational Pathology: A Survey on Foundation and Vision-Language Models23 Aug 2024
- 2024GMAI-MMBench: A Comprehensive Multimodal Evaluation Benchmark Towards General Medical AI6 Aug 2024
- 2024PathGen-1.6M: 1.6 Million Pathology Image-text Pairs Generation through Multi-agent Collaboration28 Jun 2024
- 2024PathAlign: A vision-language model for whole slide images in histopathology27 Jun 2024
- 2024GMAI-MMBench: A Comprehensive Multimodal Evaluation Benchmark Towards General Medical AIcited by 96
- 2024PathAlign: A vision-language model for whole slide images in histopathologycited by 29
- 2024PathGen-1.6M: 1.6 Million Pathology Image-text Pairs Generation through Multi-agent Collaborationcited by 28
- 2025Holistic Evaluation of Multimodal LLMs on Spatial Intelligencecited by 28
- 2025Towards Better Dental AI: A Multimodal Benchmark and Instruction Dataset for Panoramic X-ray Analysiscited by 16
- 2025Patho-AgenticRAG: Towards Multimodal Agentic Retrieval-Augmented Generation for Pathology VLMs via Reinforcement Learningcited by 13
- 2024A New Era in Computational Pathology: A Survey on Foundation and Vision-Language Modelscited by 9
- 2025Navigating Gigapixel Pathology Images with Large Multimodal Modelscited by 7
- 2025MDK12-Bench: A Comprehensive Evaluation of Multimodal Large Language Models on Multidisciplinary Examscited by 4
- 2025Domain Specific Benchmarks for Evaluating Multimodal Large Language Modelscited by 2
- 2026Do Pathology Vision-Language Models Truly See Pathology?cited by 2
- 2025HeteroRAG: A Heterogeneous Retrieval-Augmented Generation Framework for Medical Vision Language Taskscited by 1
12 most cited of 17 All 17 (JSON)
- 2026Do Pathology Vision-Language Models Truly See Pathology?23 Jul 2026
- 2026Aloe-Vision: Robust Vision-Language Models for Healthcare25 Jun 2026
- 2026What Transfers from Text to Vision? Capability Scaling Laws and Transfer Dynamics for VLMs24 Jun 2026
- 2026PathGLS: Evaluating Pathology Vision-Language Models without Ground Truth through Multi-Dimensional Consistency17 Mar 2026
- 2025Navigating Gigapixel Pathology Images with Large Multimodal Models24 Nov 2025
- 2025MedGEN-Bench: A Contextually Entangled Benchmark for Open-ended Multimodal Medical Generation17 Nov 2025
- 2025Towards Better Dental AI: A Multimodal Benchmark and Instruction Dataset for Panoramic X-ray Analysis11 Sep 2025
- 2025Holistic Evaluation of Multimodal LLMs on Spatial Intelligence18 Aug 2025
- 2025HeteroRAG: A Heterogeneous Retrieval-Augmented Generation Framework for Medical Vision Language Tasks18 Aug 2025
- 2025MDK12-Bench: A Comprehensive Evaluation of Multimodal Large Language Models on Multidisciplinary Exams9 Aug 2025
- 2025Patho-AgenticRAG: Towards Multimodal Agentic Retrieval-Augmented Generation for Pathology VLMs via Reinforcement Learning4 Aug 2025
- 2025Domain Specific Benchmarks for Evaluating Multimodal Large Language Models15 Jun 2025
12 newest of 17 All 17 (JSON)
- 2025Evidence-based diagnostic reasoning with multi-agent copilot for human pathologycited by 26
- 2025A Versatile Pathology Co-pilot via Reasoning Enhanced Multimodal Large Language Modelcited by 12
- 2025DrVD-Bench: Do Vision-Language Models Reason Like Human Doctors in Medical Image Diagnosis?cited by 10
- 2025TeamPath: Building MultiModal Pathology Experts with Reasoning AI Copilotscited by 5
- 2026Enhancing Pathological VLMs with Cross-scale Reasoningcited by 3
- 2026ReinPath: A Multimodal Reinforcement Learning Approach for Pathologycited by 1
- 2026Beyond a Single Frame: Multi-Frame Spatially Grounded Reasoning Across Volumetric MRIcited by 1
- 2026Agentic Visual Reasoning in Whole-Slide Pathology Images via Active Perceptioncited by 1
- 2026See, Measure, and Reason: Learning Visually Grounded Reasoning in Pathologycited by 0
- 2026See, Measure, and Reason: Learning Visually Grounded Reasoning in Pathology28 Sep 2026
- 2026Agentic Visual Reasoning in Whole-Slide Pathology Images via Active Perception9 Aug 2026
- 2026Enhancing Pathological VLMs with Cross-scale Reasoning16 Jun 2026
- 2026Beyond a Single Frame: Multi-Frame Spatially Grounded Reasoning Across Volumetric MRI17 Apr 2026
- 2026ReinPath: A Multimodal Reinforcement Learning Approach for Pathology21 Jan 2026
- 2025TeamPath: Building MultiModal Pathology Experts with Reasoning AI Copilots20 Nov 2025
- 2025A Versatile Pathology Co-pilot via Reasoning Enhanced Multimodal Large Language Model23 Jul 2025
- 2025Evidence-based diagnostic reasoning with multi-agent copilot for human pathology26 Jun 2025
- 2025DrVD-Bench: Do Vision-Language Models Reason Like Human Doctors in Medical Image Diagnosis?30 May 2025
- 2025CPathAgent: An Agent-based Foundation Model for Interpretable High-Resolution Pathology Image Analysis Mimicking Pathologists' Diagnostic Logiccited by 27
- 2025Multi-Modal Foundation Models for Computational Pathology: A Surveycited by 9
- 2024MedMax: Mixed-Modal Instruction Tuning for Training Biomedical Assistantscited by 6
- 2025Content Generation Models in Computational Pathology: A Comprehensive Survey on Methods, Applications, and Challengescited by 5
- 2026PathNavigate: A Training-Free Pathology Agent with Surprise-Guided Scan and Shared Slide Memory for Whole-Slide Image VQAcited by 5
- 2025Discovering Pathology Rationale and Token Allocation for Efficient Multimodal Pathology Reasoningcited by 4
- 2026Instance-Aligned Captions for Explainable Video Anomaly Detectioncited by 4
- 2025Beyond Pixel Simulation: Pathology Image Generation via Diagnostic Semantic Tokens and Prototype Controlcited by 3
- 2025Histopathology Multi-modal Embedding for Pathology Composed Retrievalcited by 2
- 2025PathVG: A New Benchmark and Dataset for Pathology Visual Groundingcited by 2
- 2026Benchmarking PhD-Level Coding in 3D Geometric Computer Visioncited by 2
- 2026PathMem: Toward Cognition-Aligned Memory Transformation for Pathology MLLMscited by 1
12 most cited of 16 All 16 (JSON)
- 2026VIPER: An Expert-Curated Benchmark for Vision-Language Models in Veterinary Pathology26 Aug 2026
- 2026From Multi-Resolution Cells to Gigapixel Whole Slide Images Foundation Model for Computational Pathology4 Aug 2026
- 2026PathNavigate: A Training-Free Pathology Agent with Surprise-Guided Scan and Shared Slide Memory for Whole-Slide Image VQA22 May 2026
- 2026PBSBench: A Multi-Level Vision-Language Framework and Benchmark for Hematopathology Whole Slide Image Interpretation19 Apr 2026
- 2026A Generative Foundation Model for Multimodal Histopathology4 Apr 2026
- 2026Benchmarking PhD-Level Coding in 3D Geometric Computer Vision31 Mar 2026
- 2026PathMem: Toward Cognition-Aligned Memory Transformation for Pathology MLLMs10 Mar 2026
- 2026Instance-Aligned Captions for Explainable Video Anomaly Detection13 Jan 2026
- 2025Beyond Pixel Simulation: Pathology Image Generation via Diagnostic Semantic Tokens and Prototype Control24 Dec 2025
- 2025CPathAgent: An Agent-based Foundation Model for Interpretable High-Resolution Pathology Image Analysis Mimicking Pathologists' Diagnostic Logic26 May 2025
- 2025Discovering Pathology Rationale and Token Allocation for Efficient Multimodal Pathology Reasoning21 May 2025
- 2025Content Generation Models in Computational Pathology: A Comprehensive Survey on Methods, Applications, and Challenges16 May 2025
12 newest of 16 All 16 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026PathView-Bench: Can Multimodal Large Language Models Achieve Fine-grained Multiscale Understanding of Pathology Images?
- 2025Patho-R1: A Multimodal Reinforcement Learning-Based Pathology Expert Reasoner
- 2023PathAsst: A Generative Foundation AI Assistant Towards Artificial General Intelligence of Pathology
- 2025PathMR: Multimodal Visual Reasoning for Interpretable Pathology Diagnosis
- 2026PathoArgus: Advancing Evidence-Grounded Long-Context Visual Reasoning across Gigapixel Whole-Slide and Multi-Slide Case Contexts
- 2025PathoHR: Hierarchical Reasoning for Vision-Language Models in Pathology
- 2026PathScale-R1: Cross-scale Reasoning for Pathological Image Analysis
- 2024CPath-Omni: A Unified Multimodal Foundation Model for Patch and Whole Slide Image Analysis in Computational Pathology