1. Install ColossalAI
git clone https://github.com/marsggbo/ColossalAI
cd ColossalAI
pip install -e .
  1. download the pth file
  2. load the state dict
from transformers import T5Tokenizer
from transformers.models.llama import LlamaConfig

config = LlamaConfig.from_pretrained(f"hpcaitech/openmoe-base")
model = OpenMoeForCausalLM(config)
ckpt = torch.load("openmoe_base_yizhongw_super_natural_instruction_generation.pth")
state_dict = {}
for key, value in ckpt.items():
    if key.startswith("module."):
        state_dict[key[7:]] = value
    else:
        state_dict[key] = value
model.load_state_dict(state_dict)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.

Dataset used to train marsggbo/OpenMoE