Downloads · 30 days
703
1% of all-time downloads
openbmb/MiniCPM-MoE-8x2B
MiniCPM-MoE-8x2B is a text generation model from openbmb. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
703
1% of all-time downloads
All-time downloads
47.7K
Public
Repo size
55.5 GB
Likes
48
Public
Click a slice to open those files.
.bin27.7 GB · 100%
From the Hugging Face model README
The MiniCPM-MoE-8x2B is a decoder-only transformer-based generative language model.
The MiniCPM-MoE-8x2B adopt a Mixture-of-Experts(MoE) architecture, which has 8 experts per layer and activates 2 of 8 experts for each token.
This is a model version after instruction tuning but without other rlhf methods. Chat template is automatically applied.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(0)
path = 'openbmb/MiniCPM-MoE-8x2B'
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map='cuda', trust_remote_code=True)
responds, history = model.chat(tokenizer, "山东省最高的山是哪座山, 它比黄山高还是矮?差距多少?", temperature=0.8, top_p=0.8)
print(responds)