Practical overview
When it fits
Use the pretrained files and reproduction scripts to examine the listed evaluations; use the separate preprocessing and training pipeline when experimenting with new Wikipedia and Wikidata5M inputs.
Who it is for
- Researchers reproducing language-model, relation-prediction, or entity-typing experiments.
- Developers adapting a joint text-and-knowledge-graph representation pipeline.
Documented uses
- Evaluate pretrained CoLAKE representations on LAMA and LAMA-UHN.
- Reproduce relation prediction on FewRel and entity typing on Open Entity.
- Retrain representations using a Wikipedia dump, Wikidata5M graph data, and entity and relation aliases.
Requirements & limits
The code repository is public and lists an MIT license. The README links to pretrained files and experiment datasets on Google Drive.
- The repository is research code with command-line Python workflows, not a hosted model service.
- The README specifies Python 3.7 and Transformers 2.11, alongside fastNLP and fitlog.
- Retraining uses DGL KVStore and may need mixed CPU-GPU training; DGL-KE is additionally identified for link-prediction reproduction.
- LAMA and LAMA-UHN reproduction requires only the pretrained model, while the other listed experiments use the experiment dataset.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare CoLAKE’s Python environment
Install the repository’s documented experiment dependencies before downloading weights or running evaluation code.
Before you start
- A Linux or CLI environment with Conda and Python 3.7.
- Git and pip.
Steps
Create and activate a Conda environment named colake with Python 3.7.
Clone fastNLP and fitlog from their linked repositories and install each using its setup.py.
Install transformers==2.11 and sklearn with pip.
For retraining, install dgl==0.4.3; add dglke if reproducing link-prediction experiments.
Expected outcome
The repository’s documented Python environment and, when needed, its DGL dependencies are installed.
Guide limitations
- This guide covers environment preparation only; it does not verify installation or run an experiment.
- The README notes that retraining may require mixed CPU-GPU training for the large entity set.
Download pretrained CoLAKE files for evaluation
Retrieve the model and, when required, entity embeddings used by the repository’s reproduction workflow.
Before you start
- The documented CoLAKE Python environment.
- The repository’s download_gdrive.py script and access to its linked Google Drive files.
Steps
Download the pretrained model and entity embeddings using the Google Drive IDs and download_gdrive.py commands in the README.
Download the paper’s experiment dataset and extract data.tar.gz.
For FewRel, enter finetune/ and run python run_re.py --debug --gpu 0; for Open Entity, run python run_typing.py --debug --gpu 0.
For LAMA or LAMA-UHN, enter lama/ and run python eval_lama.py; the README says these evaluations need only the model download.
Expected outcome
The documented evaluation scripts are invoked with the pretrained files and experiment data.
Guide limitations
- The README’s commands describe the reproduction procedure and do not establish that an experiment will complete in a particular environment.
- The README does not specify hardware requirements beyond the --gpu 0 example for FewRel and Open Entity.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- txsun1997/CoLAKE · Official homepage title · retained in its source language

