lazyslide_models.multimodal.KEEP#
- class KEEP(model_path=None, token=None)#
Bases:
ImageTextModelkeep 🤗Hugging Face GitHub Paper MIT [Zhou et al., 2026] Knowledge-enhanced pretraining for vision-language pathology foundation model on cancer diagnosis KEEP (KnowledgE-Enhanced Pathology) image-text model.
A ViT-L/16 image encoder and a BERT text encoder, aligned using a disease knowledge graph. It is strong at zero-shot cancer detection and subtyping.
The model is built here from its config and weights instead of its remote code. That code replaces timm’s
LayerScalefor the whole process, so every timm ViT built after it gets a renamed parameter, and on current timm it does not load at all: its replacement rejects thedeviceanddtypearguments timm now passes.