Model reference · open weights
MiniCPM-MoE-8x is an open-weight language model from openbmb. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | openbmb |
|---|---|
| Type | Language models |
| Task | Text gen · MoE |
| Context | 4k tokens |
| Runs with | transformers |
| Released | 2024-04-07 |
| Popularity | 4k downloads / month |
| Licence | Unknown |
About
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)
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys minicpm-moe-8x for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (minicpm-moe-8x below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minicpm-moe-8x","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.