Instructions to use opencerebral/Boris-2-50M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencerebral/Boris-2-50M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencerebral/Boris-2-50M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opencerebral/Boris-2-50M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencerebral/Boris-2-50M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencerebral/Boris-2-50M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opencerebral/Boris-2-50M
- SGLang
How to use opencerebral/Boris-2-50M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "opencerebral/Boris-2-50M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "opencerebral/Boris-2-50M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opencerebral/Boris-2-50M with Docker Model Runner:
docker model run hf.co/opencerebral/Boris-2-50M
Hugging Face |
Wiki |
Code
License: Apache 2.0 |
Authors: OpenCerebral
Boris-2-50M
Boris-2-50M is a 48.9M-parameter base language model from OpenCerebral, distilled from Boris-2 (144M) on a single NVIDIA V100. It keeps Boris-2's architecture and tokenizer at about a third of the size, without the n-gram table. It was trained as an 11-layer 52.2M model on 5B distillation tokens, then pruned to 10 layers and healed with 0.5B more distillation tokens.
This is a base model. It continues text; it does not follow instructions or chat.
Results
Zero-shot, float32 weights, lm-evaluation-harness 0.4.12 (acc_norm where the task defines it, otherwise acc). ArithMark-3 uses the leaderboard's own bencharithmark-3.py (unmodified, default settings).
| Benchmark | Metric | Boris-2-50M | 11-layer version before pruning (52.2M) | Boris-2 (teacher, 144M) |
|---|---|---|---|---|
| HellaSwag | acc_norm | 34.77 | 35.64 | 50.27 |
| ARC-Easy | acc_norm | 48.32 | 48.74 | 59.76 |
| ARC-Challenge | acc_norm | 26.79 | 27.05 | 32.00 |
| PIQA | acc_norm | 67.25 | 67.90 | 72.85 |
| MMLU (continuation) | acc | 26.01 | 26.00 | 28.96 |
| WinoGrande | acc | 53.51 | 53.35 | 52.57 |
| OpenBookQA | acc_norm | 31.40 | 31.80 | 36.60 |
| SciQ | acc_norm | 70.80 | 72.90 | 85.10 |
| CommonsenseQA | acc | 19.25 | 19.82 | 20.88 |
| Nine-task mean | 42.01 | 42.58 | 48.78 | |
| ArithMark-3 | acc_norm | 38.80 | 38.80 | 45.10 |
| ArithMark-2 | acc | 35.20 | 34.56 | |
| Open SLM Index | 20.88 | 21.68 | 34.19 |
The Index is the Open SLM Leaderboard formula: (N(HellaSwag,25) + N(mean(ARC-E, ARC-C),25) + N(PIQA,50) + 0.65 * N(ArithMark-3,25)) / 3.65, with N(v,c) = 100(v-c)/(100-c).
The released weights are the final checkpoint of the healing run. Two pruning methods were tried on the 52.2M model (removing one block, or narrowing every MLP); removing a block lost less before healing and is the one released. No other checkpoint or seed selection was done.
Model
| Field | Value |
|---|---|
| Parameters | 48.9M |
| Transformer blocks | 32.2M |
| Token embedding (tied with output) | 16.8M |
| Layers | 10 |
| Hidden size | 512 |
| Attention | 8 heads of 64, full multi-head |
| MLP | SwiGLU, inner 1408 |
| Context | 2048 tokens |
| Position encoding | RoPE, theta 10,000 |
| Vocabulary | 32,768 (Boris-2's byte-level BPE) |
Like Boris-2, each block applies a Canon layer: a causal 3-tap depthwise convolution on the fused query/key/value projection, so every position mixes in the two previous positions before attention. Unlike Boris-2 there is no n-gram table. Training packed several documents per sequence with attention and Canon masked at document boundaries; the modeling code reproduces this (eos_resets_context in the config).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "opencerebral/Boris-2-50M"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
x = tok("The water cycle begins when", return_tensors="pt")
y = model.generate(**x, max_new_tokens=40, do_sample=False)
print(tok.decode(y[0], skip_special_tokens=True))
Plain PyTorch custom code (the same as Boris-2's, with the n-gram table switched off by use_ngram: false), no extra dependencies, no KV cache. Run in float32 or bfloat16; the residual stream is kept in float32 internally.
Training
| Field | Value |
|---|---|
| Tokens | 5.0B (52.2M model) + 0.5B (healing after pruning) |
| Teacher | Boris-2 (released weights), frozen |
| Loss | 0.7 × KL(teacher ‖ student) + 0.3 × cross-entropy on the next token |
| Hardware | 1x NVIDIA V100 32GB, about 47,000 tokens per second |
| Precision | float16 mixed precision |
| Batch | 262,144 tokens per step |
| Sequence length | 2048 |
| Optimizer | Muon (matrices, peak lr 0.005) and AdamW (embedding, norms, Canon; peak lr 0.004) |
| Schedule | 1% warmup, constant, then 1-sqrt decay to zero over the last 30% |
Data: Boris-2's decay mix, as per-document draw probabilities:
| Source | Draw weight |
|---|---|
| ClimbMix | 77.6% |
| Cosmopedia v2 WikiHow-style tutorials | 8.3% |
| UltraData-Math L3 | 7.9% |
| MetaMathQA (GSM8K-derived rows) | 2.5% |
| Calc-ape210k / Calc-mawps (training splits) | 2.1% |
| Cosmopedia v1 tutorials (HellaSwag-title filtered) | 0.8% |
| DCLM-Baseline | 0.5% |
| Orca-Math | 0.3% |
The student matches the teacher's full next-token distribution on every token, computed in vocabulary chunks so the 32,768-way logits are never stored for the whole batch.
The run was interrupted once by a machine restart at 1.05B tokens and resumed from that checkpoint's weights with the learning-rate schedule continued (optimizer state was rebuilt).
Pruning and healing. To fit under 50M parameters, one of the 11 blocks was removed: each block was scored by the increase in held-out ClimbMix loss when it is skipped, and block 5 (the cheapest, +0.23 nats) was dropped. This cost 2.2 Index points. The 10-block model was then healed by distilling from Boris-2 again for 0.5B tokens (same loss and data mix; peak learning rate 0.3x the original, 5% warmup, 1-sqrt decay to zero over the last half), recovering most of the gap (internal benchmark: Index 19.51 right after pruning, 20.83 after healing).
Contamination
No benchmark training, validation or test split was trained on. Every source except ClimbMix was filtered against every evaluation item (HellaSwag, ARC, PIQA, ArithMark-3) with a 13-gram overlap check, and the how-to data excludes HellaSwag's WikiHow titles. ClimbMix, the bulk of the data, has not been filtered. The teacher, Boris-2, is documented in its own card.
Limitations
A 48.9M-parameter base model. It makes factual and arithmetic mistakes, loses track of longer arguments, and repeats itself under greedy decoding. It has no safety tuning. As a distilled model it inherits its teacher's habits and errors.
Copyright & License
Copyright 2026 OpenCerebral
This project and all associated files (the "Work") are licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- Downloads last month
- 14
Model tree for opencerebral/Boris-2-50M
Base model
opencerebral/Boris-2Datasets used to train opencerebral/Boris-2-50M
meta-math/MetaMathQA
HuggingFaceTB/smollm-corpus
Evaluation results
- acc_norm on HellaSwagvalidation set Model card34.770
- acc_norm on ARC-Easytest set Model card48.320
- acc_norm on ARC-Challengetest set Model card26.790
- acc_norm on PIQAvalidation set Model card67.250
- acc_norm on SciQtest set Model card70.800
- acc on WinoGrandevalidation set Model card53.510