Ember-2B-preview
A compact language model with long context support and function calling
2 min readupdated
The model is a post-custom version of a 1.97-billion MoE (Mixture of Experts) language model trained from scratch in English. It generates chat responses with a thinking block, supports function calling, and can work on small software projects in a multi-step mode. The architecture combines Kimi Delta Attention and full-attention layers, alongside a context of up to 128K tokens. The model is useful for researchers and developers exploring compact custom architectures and agent workflows.
Key features
- 1.97B total parameters (with 0.39B active per token) and up to 128K context.
- Built-in internal reasoning block and support for Hermes-style function calling.
- Complex hybrid architecture featuring MoE and hashed n-gram memory (Engram).
- Strong benchmark results on GSM8K, HumanEval, and MBPP with minimal pretraining volume.
What you can do
- Run the model for coding tasks and bug fixing in small projects.
- Integrate the model into pipelines supporting external function and tool calling.
- Test processing long documents of up to 85K tokens.
- Explore the custom architecture based on the author's repositories using clean PyTorch code.
Example
Running response generation with a thinking block in Python:
import json, os, sys
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from tokenizers import Tokenizer
sys.path[:0] = ["Ember-2B-base", "Ember-2B-base/runs/mac_eval"]
import decode, mac_lm
from moe_llm import chat
from moe_llm.config import ModelConfig
from moe_llm.model import MoELLM
path = snapshot_download("Liquor-06/Ember-2B-preview")
cfg = {k: v for k, v in json.load(open(f"{path}/config.json")).items() if k in ModelConfig.__dataclass_fields__}
model = MoELLM(ModelConfig.from_dict(cfg).replace(**mac_lm.CPU_OVERRIDES))
model.eval()
Read more
DetailsBenchmarks: GSM8K — 34.8, HumanEval — 26.2, MBPP — 31.2.
Training: pretrained on 25B tokens, SFT on 1.5B tokens (B300), agent fine-tuning on 0.18B tokens (RTX 4090).
Limitations: requires loading custom code from the author's GitHub repositories, standard loading via transformers is not supported.
License: Apache 2.0.










Comments