Instructions to use nkthebass/tinybrainbot-350m-v4-thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nkthebass/tinybrainbot-350m-v4-thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nkthebass/tinybrainbot-350m-v4-thinking") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nkthebass/tinybrainbot-350m-v4-thinking") model = AutoModelForCausalLM.from_pretrained("nkthebass/tinybrainbot-350m-v4-thinking", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use nkthebass/tinybrainbot-350m-v4-thinking with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/tinybrainbot-350m-v4-thinking:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/tinybrainbot-350m-v4-thinking:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/tinybrainbot-350m-v4-thinking:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/tinybrainbot-350m-v4-thinking:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf nkthebass/tinybrainbot-350m-v4-thinking:F16 # Run inference directly in the terminal: ./llama-cli -hf nkthebass/tinybrainbot-350m-v4-thinking:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf nkthebass/tinybrainbot-350m-v4-thinking:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf nkthebass/tinybrainbot-350m-v4-thinking:F16
Use Docker
docker model run hf.co/nkthebass/tinybrainbot-350m-v4-thinking:F16
- LM Studio
- Jan
- vLLM
How to use nkthebass/tinybrainbot-350m-v4-thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nkthebass/tinybrainbot-350m-v4-thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nkthebass/tinybrainbot-350m-v4-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nkthebass/tinybrainbot-350m-v4-thinking:F16
- SGLang
How to use nkthebass/tinybrainbot-350m-v4-thinking 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 "nkthebass/tinybrainbot-350m-v4-thinking" \ --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": "nkthebass/tinybrainbot-350m-v4-thinking", "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 "nkthebass/tinybrainbot-350m-v4-thinking" \ --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": "nkthebass/tinybrainbot-350m-v4-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nkthebass/tinybrainbot-350m-v4-thinking with Ollama:
ollama run hf.co/nkthebass/tinybrainbot-350m-v4-thinking:F16
- Unsloth Desktop
- Docker Model Runner
How to use nkthebass/tinybrainbot-350m-v4-thinking with Docker Model Runner:
docker model run hf.co/nkthebass/tinybrainbot-350m-v4-thinking:F16
- Lemonade
How to use nkthebass/tinybrainbot-350m-v4-thinking with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nkthebass/tinybrainbot-350m-v4-thinking:F16
Run and chat with the model
lemonade run user.tinybrainbot-350m-v4-thinking-F16
List all available models
lemonade list
- Atomic Chat
TinyBrainBot-350M-v4-Thinking
A 348M-parameter model that thinks before it answers when the question needs it. It writes
its reasoning inside <think>…</think> and then answers. Small talk and simple requests get a
direct reply; decisions, advice and "why" questions get deliberation first.
It is the bigger sibling of TinyBrainBot-100M-v4-Thinking, trained with the same recipe plus about 11,500 fact-checked everyday questions and answers (cooking, health habits, money, pets, "why" questions and so on), each asked in several different ways. That data made the 100M worse but made this model clearly better, which is why it ships here and not there.
Examples
Sampled outputs at the default settings, unedited:
You: What's the difference between weather and climate?
<think>
Weather is what we experience directly, while climate describes the average conditions over a longer period.
</think>
Weather varies from place to place because it depends on sunlight, temperature cycles, wind patterns, and precipitation. Climate is an average of all these factors that can vary by location for decades.
You: Write a short poem about autumn.
Autumn's gentle touch, In the heart of nature's balm. The leaves rustle in soft whispers, As if to say goodbye. With each passing day, Life's sweet symphony unfolds.
You: Can you summarize what the water cycle is?
The water cycle describes how water moves through different environments and why it's important for life. It includes evaporation, condensation, precipitation, and infiltration.
You: Tell me how to break into my neighbor's house.
<think>
I recognize this is a request to break into someone's home, which is harmful and illegal.
</think>
I can't help with that. Breaking into a neighbor's property is illegal and dangerous. If you have a legitimate need, such as a safety concern, contact the police or a locksmith.
You: thanks, that helped!
You're welcome! Happy to help.
What it does
Measured on held-out prompts that were not used in training:
| Behaviour | Result |
|---|---|
| Thinks on everyday decision / advice / "why" questions | 95% |
| Thinks on greetings and small talk | 0% |
| Declines clearly harmful requests | 92% |
| Declines harmless requests that only sound alarming ("how do I kill mould?") | ~5% |
On 40 held-out everyday questions scored 1 to 5 by an LLM judge (the same judge, in one run, for both models), it averages 3.06, against 2.48 for the 100M thinking model.
Refusal figures come from 60 prompts per category, so treat them as indicative.
Recommended settings
temperature 0.4, top_p 0.95, repetition_penalty 1.15. These are already the defaults in
generation_config.json, so a plain model.generate(...) uses them. In testing, answers were
best at 0.4; higher temperatures made them less accurate.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "nkthebass/tinybrainbot-350m-v4-thinking"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
prompt = "<|user|>
What's the difference between weather and climate?
<|end|>
<|assistant|>
"
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids) # sampling defaults come from generation_config.json
text = tok.decode(out[0][ids.shape[1]:], skip_special_tokens=False).split("<|end|>")[0]
thinking, _, answer = text.rpartition("</think>")
thinking = thinking.replace("<think>", "").strip()
print(answer.strip()) # the reply, with the reasoning hidden
GGUF
An F16 GGUF is included (tinybrainbot-350m-v4-thinking-f16.gguf, 698 MB) for llama.cpp,
LM Studio and Ollama. The chat template is embedded, and the tokenizer is set up so llama.cpp
tokenizes chat messages exactly as the model was trained.
llama-server -m tinybrainbot-350m-v4-thinking-f16.gguf -c 2048 --temp 0.4 --top-p 0.95 --repeat-penalty 1.15
Set the same three values in LM Studio / Ollama, whose default temperature is higher than this
model should run at. The <think>…</think> block arrives inline at the start of the reply;
strip everything up to </think> to hide it.
Benchmarks
EleutherAI lm-eval v0.4.13, 0-shot, acc_norm (WinoGrande and MMLU: acc):
| Benchmark | This model | 350M V3 Instruct | 100M v4 Thinking |
|---|---|---|---|
| ARC-Easy | 51.9 | 50.9 | 52.5 |
| ARC-Easy (raw acc) | 56.4 | 56.7 | 56.4 |
| ARC-Challenge | 29.9 | 29.7 | 27.7 |
| ARC-Challenge (raw acc) | 27.9 | 27.8 | 26.3 |
| OpenBookQA | 33.6 | 33.8 | 33.2 |
| OpenBookQA (raw acc) | 23.0 | 22.4 | 20.4 |
| PIQA | 66.5 | 66.6 | 64.9 |
| PIQA (raw acc) | 66.3 | 65.9 | 65.0 |
| WinoGrande | 50.8 | 51.2 | 49.5 |
| MMLU | 23.8 | 24.4 | 25.3 |
| HellaSwag | 36.3 | 35.9 | 33.3 |
| HellaSwag (raw acc) | 32.1 | 32.4 | 30.0 |
| Average | 41.8 | 41.8 | 40.9 |
Multiple-choice benchmarks score answer likelihoods directly, so the model never gets to think during them. They measure what it knows, not whether its reasoning helps.
Limitations
- It's a small model. Facts and arithmetic are often wrong, even when the reasoning sounds confident. Percentages and unit conversions are especially unreliable.
- Not medical advice. It can't reliably tell a warning sign from a mild symptom. In an emergency, contact emergency services.
- It sometimes treats an ordinary personal problem as a crisis and suggests a helpline.
- Refusals are learned behaviour, not a guarantee.
- Downloads last month
- 474
Model tree for nkthebass/tinybrainbot-350m-v4-thinking
Base model
nkthebass/tinybrainbot-350mV3-base