Instructions to use opencerebral/Boris-2-Think with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencerebral/Boris-2-Think with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencerebral/Boris-2-Think", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opencerebral/Boris-2-Think", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencerebral/Boris-2-Think with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencerebral/Boris-2-Think" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-Think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/opencerebral/Boris-2-Think
- SGLang
How to use opencerebral/Boris-2-Think 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-Think" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-Think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-Think" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencerebral/Boris-2-Think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use opencerebral/Boris-2-Think with Docker Model Runner:
docker model run hf.co/opencerebral/Boris-2-Think
Hugging Face |
Wiki |
License: Apache 2.0 |
Authors: OpenCerebral
Boris-2-Think
Boris-2-Think is Boris-2, a 144M-parameter model trained from scratch on a single NVIDIA V100, fine-tuned to write a short reasoning trace inside <think> tags before giving a final answer. The traces come from OpenThink, an OpenCerebral distillation set of 43k short, self-consistency-checked reasoning traces written for models this size.
It is a question-answering model: it answers a question with <think>β¦</think> and a Final answer: line. It is not a general chat assistant; for conversation use Boris-2-Instruct.
Results
Zero-shot, float32, lm-evaluation-harness 0.4.12 (the Open SLM Leaderboard's settings). ArithMark-3 uses the leaderboard's own bencharithmark-3.py (unmodified, default settings). All numbers are in benchmarks_comparison.csv.
| Benchmark | Metric | Boris-2 | Boris-2-Think |
|---|---|---|---|
| HellaSwag | acc_norm | 50.27 | 50.13 |
| ARC-Easy | acc_norm | 59.76 | 63.93 |
| ARC-Challenge | acc_norm | 32.00 | 34.81 |
| PIQA | acc_norm | 72.85 | 72.31 |
| ArithMark-3 | acc_norm | 45.10 | 49.20 |
| Open SLM Index | 34.15 | 36.05 |
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 gain is in reasoning and science: ARC-Easy +4.2, ARC-Challenge +2.8, ArithMark-3 +4.1, SciQ +2.0. HellaSwag and PIQA stay level. On the 9-task average in the chart, Boris-2-Think leads every model under 150M parameters (49.53).
These benchmarks score the likelihood of each answer choice; the model does not generate a trace during them. The gain comes from what fine-tuning on reasoning traces does to the weights.
How this checkpoint was chosen. Two output formats were compared, plain traces and <think> tags, with two seeds each, on our own scorer: Index 36.58 and 36.33 for plain, 36.06 and 36.31 for <think>. The difference is within the seed-to-seed spread, and <think> was chosen because chat front-ends can hide or fold the reasoning. The released checkpoint is the better of the two <think> seeds.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "opencerebral/Boris-2-Think"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
msgs = [{"role": "user", "content": "Tom has 3 boxes with 6 pencils each. He gives away 5 pencils. How many are left?"}]
x = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True)
y = model.generate(**x, max_new_tokens=200, do_sample=False, stop_strings=["<|im_end|>"], tokenizer=tok)
print(tok.decode(y[0, x["input_ids"].shape[1]:]).removesuffix("<|im_end|>"))
<think>
3 boxes Γ 6 pencils = 18 pencils total. He gives away 5, leaving 18 β 5 = 13.
</think>
Final answer: 13
ChatML-style turns written as plain text (no tokens were added to the vocabulary). <|im_end|> spans several tokens and is not an end-of-sequence token, so pass it as a stop string as above. Greedy decoding works best for short reasoning. Plain PyTorch custom code, no extra dependencies, no KV cache.
Training
| Field | Value |
|---|---|
| Base model | Boris-2 (200.04B tokens) |
| Data | OpenThink, hybrid recipe: 42,301 training rows (800 held out) |
| Format | user question, then <think>\n{reasoning}\n</think>\n\nFinal answer: {answer} |
| Loss | assistant reply and its closing `< |
| Epochs / steps | 2 / 404, 16 packed rows of 2048 tokens per step |
| Optimizer | AdamW, lr 5e-5, betas (0.9, 0.95), no weight decay, grad clip 1.0 |
| Schedule | linear warmup, cosine to zero |
| Hardware | 1x NVIDIA V100 32GB, about 5 minutes |
Held-out loss: 1.932 before fine-tuning, 0.685 after.
OpenThink. One model writes a checkable question from a grid of six categories (quantitative, everyday logic, deduction, code tracing, cause and effect, reading inference); a second model (MiMo-v2.6-flash) solves it twice in at most about 120 words, and only questions where both solutions reach the same final answer are kept. The median trace is about 115 tokens. In the hybrid recipe, the cause-and-effect and reading-inference rows keep only the final answer (an empty <think> block); an earlier ablation showed reasoning traces help arithmetic and multi-step questions but slightly hurt commonsense tasks. Generation credits were donated by DQN Labs. Every generated question was 13-gram checked against the evaluation splits of ARC, HellaSwag, SciQ, OpenBookQA and WinoGrande, and questions and traces against PIQA's validation and test items (13-, 10- and 8-word sequences); nothing was flagged. Questions and traces were also checked against all 1,000 ArithMark-3 items: 0 exact matches and 0 shared 13-, 10- or 8-word sequences. A stricter numeric check (identical numbers and the same answer) found 238 pairs, all different problems (at most 10% word overlap). The scripts and reports are in the OpenThink repo.
Limitations
A 144M-parameter model. Its reasoning is shallow: it gets simple arithmetic and one- or two-step word problems right, but it often fails at logic (it skips the trace on some deduction questions and answers wrongly) and at anything longer. It only knows the question-and-answer format and gives odd replies to ordinary conversation. It has no safety tuning.
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
- 2
Model tree for opencerebral/Boris-2-Think
Base model
opencerebral/Boris-2