Text Generation
Transformers
Safetensors
English
boris2
chat
instruct
reasoning
small-language-model
causal-lm
conversational
custom_code
Instructions to use opencerebral/Boris-2-Think-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencerebral/Boris-2-Think-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencerebral/Boris-2-Think-Instruct", 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-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencerebral/Boris-2-Think-Instruct 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-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-2-Think-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/opencerebral/Boris-2-Think-Instruct
- SGLang
How to use opencerebral/Boris-2-Think-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-2-Think-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-2-Think-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-2-Think-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-2-Think-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use opencerebral/Boris-2-Think-Instruct with Docker Model Runner:
docker model run hf.co/opencerebral/Boris-2-Think-Instruct
File size: 1,181 Bytes
45c3b6a | 1 2 3 4 5 6 7 8 9 10 11 12 | model,params,hellaswag,arc_easy,arc_challenge,piqa,mmlu_continuation,winogrande,openbookqa,sciq,commonsense_qa,average_9,source
Boris-2-Think-Instruct,144M,48.56,59.76,32.0,71.6,28.61,51.93,33.0,84.5,19.9,47.76,lm-eval (all 9)
Boris-2-Think,144M,50.13,63.93,34.81,72.31,29.3,53.67,34.4,87.1,20.15,49.53,lm-eval (all 9)
Boris-2-Instruct,144M,48.84,57.74,31.48,71.06,28.41,52.09,34.6,83.6,23.1,47.88,lm-eval (all 9)
Boris-2,144M,50.27,59.76,32.0,72.85,28.96,52.57,36.6,85.1,20.88,48.78,lm-eval (all 9)
Boris-125M,125M,29.25,40.7,23.81,59.58,25.08,49.25,28.2,58.8,19.49,37.13,lm-eval (all 9)
GPT-X3-150M,149M,46.16,59.64,31.31,71.33,28.87,54.62,34.4,80.3,23.1,47.75,leaderboard (HS/ARC/PIQA) + lm-eval (other 5)
SmolLM2-135M,135M,43.22,58.63,29.69,68.44,29.9,52.96,33.4,78.2,19.49,45.99,leaderboard (HS/ARC/PIQA) + lm-eval (other 5)
KLM-1.6,99M,45.28,61.07,33.53,70.18,29.26,52.33,32.8,89.3,18.92,48.07,leaderboard (HS/ARC/PIQA) + lm-eval (other 5)
BananaMind-2.5-Pro,139M,43.6,62.79,31.14,68.12,29.24,52.57,34.0,85.1,20.39,47.44,lm-eval (all 9)
LFM-2.5-350M-Base,354M,45.16,68.86,41.13,67.63,33.32,55.25,36.2,84.9,41.28,52.64,leaderboard (HS/ARC/PIQA) + lm-eval (other 5)
|