Text Generation
Transformers
Safetensors
English
gpt2
boris
nmai
75M
conversational
text-generation-inference
Instructions to use KSP-NMAI/Boris-75M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KSP-NMAI/Boris-75M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KSP-NMAI/Boris-75M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KSP-NMAI/Boris-75M-Instruct") model = AutoModelForCausalLM.from_pretrained("KSP-NMAI/Boris-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 KSP-NMAI/Boris-75M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KSP-NMAI/Boris-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": "KSP-NMAI/Boris-75M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KSP-NMAI/Boris-75M-Instruct
- SGLang
How to use KSP-NMAI/Boris-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 "KSP-NMAI/Boris-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": "KSP-NMAI/Boris-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 "KSP-NMAI/Boris-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": "KSP-NMAI/Boris-75M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KSP-NMAI/Boris-75M-Instruct with Docker Model Runner:
docker model run hf.co/KSP-NMAI/Boris-75M-Instruct
Fix model card: correct title, document prompt format, add pipeline_tag/base_model metadata
c5b4036 verified | license: apache-2.0 | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| datasets: | |
| - tatsu-lab/alpaca | |
| - HuggingFaceFW/fineweb-edu | |
| - mlfoundations/dclm-baseline-1.0-parquet | |
| tags: | |
| - boris | |
| - nmai | |
| - gpt2 | |
| - 75M | |
| base_model: | |
| - KSP-NMAI/Boris-75M | |
|  | |
| # Boris-75M-Instruct | |
| Boris-75M-Instruct is the instruction-tuned variant of | |
| [KSP-NMAI/Boris-75M](https://huggingface.co/KSP-NMAI/Boris-75M), a 75 million-parameter | |
| language model created by New Millennium Artificial Intelligence (NMAI). | |
| It was fine-tuned on [tatsu-lab/alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca). | |
| ## Prompt format | |
| This model uses the **Alpaca** format. A chat template is included in | |
| `tokenizer_config.json`, so `apply_chat_template` produces the correct prompt | |
| automatically: | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("KSP-NMAI/Boris-75M-Instruct") | |
| model = AutoModelForCausalLM.from_pretrained("KSP-NMAI/Boris-75M-Instruct") | |
| messages = [{"role": "user", "content": "What is the capital of France?"}] | |
| prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| ids = tok(prompt, return_tensors="pt").input_ids | |
| out = model.generate(ids, max_new_tokens=64, do_sample=True, top_p=0.95, temperature=0.7) | |
| print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True)) | |
| ``` | |
| If you are building the prompt by hand, the layout is: | |
| ``` | |
| ### Instruction: | |
| {your instruction} | |
| ### Response: | |
| ``` | |
| Generation should stop at `### Instruction:` (or end-of-text, token id 0). | |
| ## Details | |
| | | | | |
| |---|---| | |
| | Architecture | GPT-2 (pre-LN, learned positional embeddings, tied embeddings) | | |
| | Layers / heads / d_model | 12 / 9 / 576 | | |
| | Context length | 1024 | | |
| | Vocab | 50304 (GPT-NeoX-20B BPE, padded) | | |
| | Tokenizer | `EleutherAI/gpt-neox-20b` | | |
| | Precision | trained in bf16 autocast with fp32 master weights | | |
| ## Base model training | |
| Trained on 1.55B tokens for 14:49:08 on one RTX 3060. | |
| | | | | |
| |---|---| | |
| | Final loss | 3.6356 | | |
| | Final grad norm | 0.328 | | |
| | Final learning rate | 6.00e-05 | | |
|  | |
| The table above describes the base model's pretraining run; the instruction | |
| tuning was applied on top of that checkpoint. | |
| ## Limitations | |
| This is a very small instruction-tuned model. It will produce text that is | |
| frequently inaccurate, inconsistent, or offensive, and it has received no | |
| alignment, RLHF, or safety tuning beyond supervised fine-tuning on Alpaca. Do | |
| not rely on it for factual information or deploy it without supervision. | |
| ## Copyright & License | |
| *Copyright 2026 Joseph Jones* | |
| 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. | |