Instructions to use nkthebass/TinyBrainBot-303m-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nkthebass/TinyBrainBot-303m-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nkthebass/TinyBrainBot-303m-base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nkthebass/TinyBrainBot-303m-base") model = AutoModelForCausalLM.from_pretrained("nkthebass/TinyBrainBot-303m-base", 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
- llama.cpp
How to use nkthebass/TinyBrainBot-303m-base 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-303m-base:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/TinyBrainBot-303m-base:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/TinyBrainBot-303m-base:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/TinyBrainBot-303m-base: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-303m-base:F16 # Run inference directly in the terminal: ./llama-cli -hf nkthebass/TinyBrainBot-303m-base: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-303m-base:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf nkthebass/TinyBrainBot-303m-base:F16
Use Docker
docker model run hf.co/nkthebass/TinyBrainBot-303m-base:F16
- LM Studio
- Jan
- vLLM
How to use nkthebass/TinyBrainBot-303m-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nkthebass/TinyBrainBot-303m-base" # 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-303m-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nkthebass/TinyBrainBot-303m-base:F16
- SGLang
How to use nkthebass/TinyBrainBot-303m-base 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-303m-base" \ --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-303m-base", "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-303m-base" \ --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-303m-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nkthebass/TinyBrainBot-303m-base with Ollama:
ollama run hf.co/nkthebass/TinyBrainBot-303m-base:F16
- Unsloth Studio
How to use nkthebass/TinyBrainBot-303m-base with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nkthebass/TinyBrainBot-303m-base to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nkthebass/TinyBrainBot-303m-base to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nkthebass/TinyBrainBot-303m-base to start chatting
- Docker Model Runner
How to use nkthebass/TinyBrainBot-303m-base with Docker Model Runner:
docker model run hf.co/nkthebass/TinyBrainBot-303m-base:F16
- Lemonade
How to use nkthebass/TinyBrainBot-303m-base with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nkthebass/TinyBrainBot-303m-base:F16
Run and chat with the model
lemonade run user.TinyBrainBot-303m-base-F16
List all available models
lemonade list
- Atomic Chat
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf nkthebass/TinyBrainBot-303m-base:F16# Run inference directly in the terminal:
llama cli -hf nkthebass/TinyBrainBot-303m-base:F16Use 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-303m-base:F16# Run inference directly in the terminal:
./llama-cli -hf nkthebass/TinyBrainBot-303m-base:F16Build 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-303m-base:F16# Run inference directly in the terminal:
./build/bin/llama-cli -hf nkthebass/TinyBrainBot-303m-base:F16Use Docker
docker model run hf.co/nkthebass/TinyBrainBot-303m-base:F16TinyBrainBot 303M β Base
A 303M-parameter, LLaMA-architecture language model trained from scratch on a home server (2Γ NVIDIA Tesla P100). This is the base (pretrained) model β it has not been instruction-tuned, so it completes text rather than following chat instructions.
π For the chat/assistant version, see TinyBrainBot 303M Instruct.
Model details
| Parameters | ~303M |
| Architecture | LLaMA-style decoder (RoPE, RMSNorm, SwiGLU, pre-norm) |
| Layers | 24 |
| Hidden size | 1024 |
| Attention heads | 16 (GQA, 4 KV heads) |
| Head dim | 64 |
| FFN size | 2816 |
| Vocab | 32,000 (custom SentencePiece BPE) |
| Context length | 1024 |
| Tied embeddings | Yes |
| Precision | fp16 |
It re-expresses cleanly as a LlamaForCausalLM, so it loads with standard π€ Transformers.
Training
Pretrained on a mix of open English text plus synthetic distillation data:
- Web / educational text: FineWeb-Edu, English Wikipedia, OpenWebText2
- Narrative: TinyStories
- Math/reasoning: Orca-Math
- Synthetic fact distillation: Q&A and short-fact data generated by a stronger teacher model (Ling 2.6 Flash) to densify factual coverage.
Total training tokens are on the order of a few billion β far fewer than models like SmolLM/Pythia (hundreds of billions). This is a hobbyist/research model; capability scales with tokens, and this one is intentionally token-limited. (4.7B)
Intended use
- A starting point for continued pretraining or fine-tuning at small scale.
- Text completion and research on small language models.
- Not for chat/instruction following β use the Instruct version for that.
Limitations
- Shallow, fragile factual knowledge. It knows common facts but is sensitive to phrasing and capitalization (e.g. "France" vs "france" can flip the answer).
- Weak at reasoning and math; roughly random on knowledge benchmarks like MMLU (typical for this size).
- Will produce fluent plausible-but-wrong text confidently. Pair with retrieval (RAG) for anything factual.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("your-username/tinybrainbot-303m-base")
model = AutoModelForCausalLM.from_pretrained("your-username/tinybrainbot-303m-base", torch_dtype=torch.float16)
ids = tok("The water cycle is the process by which", return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=40, do_sample=True, temperature=0.6, top_p=0.9, repetition_penalty=1.2)
print(tok.decode(out[0], skip_special_tokens=True))
License
Apache-2.0 (change if you prefer a different license).
- Downloads last month
- 596
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/TinyBrainBot-303m-base:F16# Run inference directly in the terminal: llama cli -hf nkthebass/TinyBrainBot-303m-base:F16