Text Generation
Transformers
Safetensors
English
gpt2
boris
nmai
75M
instruct
conversational
text-generation-inference
Instructions to use opencerebral/Boris-1.3-75M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencerebral/Boris-1.3-75M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencerebral/Boris-1.3-75M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opencerebral/Boris-1.3-75M-Instruct") model = AutoModelForCausalLM.from_pretrained("opencerebral/Boris-1.3-75M-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencerebral/Boris-1.3-75M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencerebral/Boris-1.3-75M-Instruct" # 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-1.3-75M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/opencerebral/Boris-1.3-75M-Instruct
- SGLang
How to use opencerebral/Boris-1.3-75M-Instruct 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-1.3-75M-Instruct" \ --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-1.3-75M-Instruct", "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-1.3-75M-Instruct" \ --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-1.3-75M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use opencerebral/Boris-1.3-75M-Instruct with Docker Model Runner:
docker model run hf.co/opencerebral/Boris-1.3-75M-Instruct
Commit ·
8545a28
0
Parent(s):
Duplicate from KSP-NMAI/Boris-1.3-75M
Browse files- .gitattributes +38 -0
- Boris-1.3-75M.png +3 -0
- README.md +124 -0
- benchmarks.png +3 -0
- config.json +35 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
.gitattributes
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Boris-75M.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Boris-1.3-75M.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
benchmarks.png filter=lfs diff=lfs merge=lfs -text
|
Boris-1.3-75M.png
ADDED
|
Git LFS Details
|
README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
datasets:
|
| 8 |
+
- HuggingFaceFW/fineweb-edu
|
| 9 |
+
- mlfoundations/dclm-baseline-1.0-parquet
|
| 10 |
+
tags:
|
| 11 |
+
- boris
|
| 12 |
+
- nmai
|
| 13 |
+
- gpt2
|
| 14 |
+
- 75M
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
# Boris-1.3-75M
|
| 20 |
+
|
| 21 |
+
Boris-1.3-75M is a 75 million-parameter language model created by New Millennium
|
| 22 |
+
Artificial Intelligence (NMAI). It extends the original Boris-75M base checkpoint
|
| 23 |
+
with additional continued pretraining aimed at closing gaps found in Boris-75M's
|
| 24 |
+
own benchmark results (see *Continued pretraining* below).
|
| 25 |
+
|
| 26 |
+
This is a **base (pretrained) model**. It has not been instruction-tuned and does
|
| 27 |
+
not follow instructions or hold a conversation — it continues text. For an
|
| 28 |
+
instruction-following version, see
|
| 29 |
+
[KSP-NMAI/Boris-1.3-75M-Instruct](https://huggingface.co/KSP-NMAI/Boris-1.3-75M-Instruct).
|
| 30 |
+
|
| 31 |
+
## Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 35 |
+
|
| 36 |
+
tok = AutoTokenizer.from_pretrained("KSP-NMAI/Boris-1.3-75M")
|
| 37 |
+
model = AutoModelForCausalLM.from_pretrained("KSP-NMAI/Boris-1.3-75M")
|
| 38 |
+
|
| 39 |
+
ids = tok("The ocean is", return_tensors="pt").input_ids
|
| 40 |
+
out = model.generate(ids, max_new_tokens=40, do_sample=True, top_p=0.95)
|
| 41 |
+
print(tok.decode(out[0], skip_special_tokens=True))
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Details
|
| 45 |
+
|
| 46 |
+
| | |
|
| 47 |
+
|---|---|
|
| 48 |
+
| Architecture | GPT-2 (pre-LN, learned positional embeddings, tied embeddings) |
|
| 49 |
+
| Layers / heads / d_model | 12 / 9 / 576 |
|
| 50 |
+
| Context length | 1024 |
|
| 51 |
+
| Vocab | 50304 (GPT-NeoX-20B BPE, padded) |
|
| 52 |
+
| Tokenizer | `EleutherAI/gpt-neox-20b` |
|
| 53 |
+
| Precision | trained in bf16 autocast with fp32 master weights |
|
| 54 |
+
|
| 55 |
+
## Base model training
|
| 56 |
+
|
| 57 |
+
The Boris-75M base checkpoint was trained on 1.55B tokens of FineWeb-Edu for
|
| 58 |
+
14:49:08 on one RTX 3060.
|
| 59 |
+
|
| 60 |
+
| | |
|
| 61 |
+
|---|---|
|
| 62 |
+
| Final loss | 3.6356 |
|
| 63 |
+
| Final grad norm | 0.328 |
|
| 64 |
+
| Final learning rate | 6.00e-05 |
|
| 65 |
+
|
| 66 |
+
## Continued pretraining
|
| 67 |
+
|
| 68 |
+
Boris-75M's own benchmark results showed a gap on HellaSwag/CommonsenseQA-style
|
| 69 |
+
tasks consistent with FineWeb-Edu's educational-content skew. Boris-1.3-75M adds
|
| 70 |
+
three sequential continued-pretraining passes on top of the base checkpoint,
|
| 71 |
+
each with a re-warmed learning rate, extending total training by 2.4B tokens
|
| 72 |
+
(~60% more than the original 1.55B-token pretraining run):
|
| 73 |
+
|
| 74 |
+
| Pass | Data | Tokens | Wall-clock (RTX 3060) |
|
| 75 |
+
|---|---|---|---|
|
| 76 |
+
| 1 | DCLM-baseline | 1.5B | 14h 57m |
|
| 77 |
+
| 2 | FineWeb-Edu | 0.3B | ~2.5h *(estimated)* |
|
| 78 |
+
| 3 | FineWeb-Edu | 0.6B | ~5.0h *(estimated)* |
|
| 79 |
+
|
| 80 |
+
| | |
|
| 81 |
+
|---|---|
|
| 82 |
+
| Final loss | *3.3302* |
|
| 83 |
+
| Final grad norm | *3.3302* |
|
| 84 |
+
| Final learning rate | *1.00e-05* |
|
| 85 |
+
|
| 86 |
+
**Why this recipe:** DCLM alone improved fluency/coherence tasks (LAMBADA,
|
| 87 |
+
WinoGrande) but noticeably cost ARC-Easy/ARC-Challenge performance. The two
|
| 88 |
+
follow-up FineWeb-Edu passes were run specifically to test whether that cost was
|
| 89 |
+
recoverable — it was: ARC-Easy and ARC-Challenge both ended above their original
|
| 90 |
+
Boris-75M base values, while most of the DCLM-driven fluency gains held.
|
| 91 |
+
|
| 92 |
+
| Task | Boris-75M | +DCLM | +FineWeb-Edu | Boris-1.3-75M |
|
| 93 |
+
|---|---|---|---|---|
|
| 94 |
+
| HellaSwag (acc_norm) | 27.20 | 27.14 | 27.27 | 27.57 |
|
| 95 |
+
| PIQA (acc_norm) | 57.18 | 58.81 | 59.30 | 59.41 |
|
| 96 |
+
| WinoGrande (acc) | 49.72 | 51.70 | 51.93 | 51.54 |
|
| 97 |
+
| ARC-Easy (acc_norm) | 39.14 | 38.76 | 39.48 | 40.57 |
|
| 98 |
+
| ARC-Challenge (acc_norm) | 23.04 | 21.84 | 22.78 | 23.46 |
|
| 99 |
+
| LAMBADA (acc) | 15.21 | 19.27 | 19.17 | 18.16 |
|
| 100 |
+
| **Mean-6** | **35.25** | **36.25** | **36.66** | **36.79** |
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
|
| 104 |
+
## Limitations
|
| 105 |
+
|
| 106 |
+
A base model of this size will produce text that is frequently inaccurate,
|
| 107 |
+
inconsistent, or offensive. It has received no alignment or safety tuning and
|
| 108 |
+
should not be used for factual reference or deployed without supervision.
|
| 109 |
+
|
| 110 |
+
## Copyright & License
|
| 111 |
+
|
| 112 |
+
*Copyright 2026 Joseph Jones*
|
| 113 |
+
|
| 114 |
+
This project and all associated files (the "Work") are licensed under the Apache
|
| 115 |
+
License, Version 2.0 (the "License"); you may not use this project except in
|
| 116 |
+
compliance with the License. You may obtain a copy of the License at:
|
| 117 |
+
|
| 118 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 119 |
+
|
| 120 |
+
Unless required by applicable law or agreed to in writing, software distributed
|
| 121 |
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
| 122 |
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
| 123 |
+
specific language governing permissions and limitations under the License.
|
| 124 |
+
|
benchmarks.png
ADDED
|
Git LFS Details
|
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu",
|
| 3 |
+
"add_cross_attention": false,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.0,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"embd_pdrop": 0.0,
|
| 11 |
+
"eos_token_id": 0,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"model_type": "gpt2",
|
| 15 |
+
"n_ctx": 1024,
|
| 16 |
+
"n_embd": 576,
|
| 17 |
+
"n_head": 9,
|
| 18 |
+
"n_inner": null,
|
| 19 |
+
"n_layer": 12,
|
| 20 |
+
"n_positions": 1024,
|
| 21 |
+
"pad_token_id": null,
|
| 22 |
+
"reorder_and_upcast_attn": false,
|
| 23 |
+
"resid_pdrop": 0.0,
|
| 24 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 25 |
+
"scale_attn_weights": true,
|
| 26 |
+
"summary_activation": null,
|
| 27 |
+
"summary_first_dropout": 0.1,
|
| 28 |
+
"summary_proj_to_labels": true,
|
| 29 |
+
"summary_type": "cls_index",
|
| 30 |
+
"summary_use_proj": true,
|
| 31 |
+
"tie_word_embeddings": true,
|
| 32 |
+
"transformers_version": "5.13.1",
|
| 33 |
+
"use_cache": true,
|
| 34 |
+
"vocab_size": 50304
|
| 35 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"transformers_version": "5.13.1",
|
| 8 |
+
"use_cache": true
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fee1ba947d5603c7d9297dc69830d7f1db9b8afa4c2bffbbe7060d9f4b73ed5
|
| 3 |
+
size 309741640
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"errors": "replace",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": "<|padding|>",
|
| 11 |
+
"tokenizer_class": "GPTNeoXTokenizer",
|
| 12 |
+
"trim_offsets": true,
|
| 13 |
+
"unk_token": "<|endoftext|>"
|
| 14 |
+
}
|