Instructions to use leopard-Ai/rb-nano-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use leopard-Ai/rb-nano-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leopard-Ai/rb-nano-GGUF", filename="rb-nano-f16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use leopard-Ai/rb-nano-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leopard-Ai/rb-nano-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf leopard-Ai/rb-nano-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leopard-Ai/rb-nano-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf leopard-Ai/rb-nano-GGUF: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 leopard-Ai/rb-nano-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf leopard-Ai/rb-nano-GGUF: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 leopard-Ai/rb-nano-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf leopard-Ai/rb-nano-GGUF:F16
Use Docker
docker model run hf.co/leopard-Ai/rb-nano-GGUF:F16
- LM Studio
- Jan
- vLLM
How to use leopard-Ai/rb-nano-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leopard-Ai/rb-nano-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leopard-Ai/rb-nano-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/leopard-Ai/rb-nano-GGUF:F16
- Ollama
How to use leopard-Ai/rb-nano-GGUF with Ollama:
ollama run hf.co/leopard-Ai/rb-nano-GGUF:F16
- Unsloth Studio
How to use leopard-Ai/rb-nano-GGUF 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 leopard-Ai/rb-nano-GGUF 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 leopard-Ai/rb-nano-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for leopard-Ai/rb-nano-GGUF to start chatting
- Docker Model Runner
How to use leopard-Ai/rb-nano-GGUF with Docker Model Runner:
docker model run hf.co/leopard-Ai/rb-nano-GGUF:F16
- Lemonade
How to use leopard-Ai/rb-nano-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leopard-Ai/rb-nano-GGUF:F16
Run and chat with the model
lemonade run user.rb-nano-GGUF-F16
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)rb-nano
A 48M-parameter, GPT-2-style decoder-only transformer trained from scratch as part of the Leopard AI Model Suite. Small enough to run on CPU or any GPU; built as a learning/research model, not a production assistant.
Run it
With Ollama:
ollama run rafi-dev/rb-nano
With llama.cpp:
./llama-cli -m rb-nano-f16.gguf -p "user: hello\nai:"
What it is
rb-nano is a tiny chat model pretrained on web text and instruction-tuned for short, single- and multi-turn conversations. At 48M parameters it sits well below the knowledge capacity of mainstream models, so treat it as a fast, lightweight demonstrator rather than a factual reference.
Architecture
| Type | Decoder-only transformer (GPT-2 family) |
| Parameters | ~48M |
Embedding dim (d_model) |
512 |
| Layers | 10 |
| Attention heads | 8 |
| Context length | 1024 tokens |
| Position embeddings | Learned |
| Norm / activation | LayerNorm, GELU-tanh |
| Attention | Combined QKV, SDPA (flash) |
| Head | Weight-tied to token embeddings |
| Tokenizer | ByteLevel BPE, 32k vocab |
| Format | GGUF, f16 (gpt2 architecture) |
Training
- Pretrain β FineWeb-Edu (
sample-10BT), ~50M tokens. Final val loss β 3.44. - Finetune β Alpaca, Alpaca-cleaned, CodeAlpaca-20k, Dolly-15k, and ShareGPT (full multi-turn threads, loss masked to assistant turns only). Final val loss β 2.67.
Prompt format
The model is trained on a simple user: / ai: turn format (Ollama's chat template handles this automatically):
user: hello
ai: Hi there! How can I help you today?
user: what is python?
ai:
Recommended parameters
temperature 0.7
top_k 40
top_p 0.9
repeat_penalty 1.3
Limitations
- Knowledge. At 48M params the model has very limited factual knowledge and will confidently hallucinate (made-up libraries, wrong dates, etc.). It cannot be a reliable source of facts.
- Coherence. Good for short exchanges; longer or more technical answers drift.
- Scope. English-centric, 1024-token context. Best for demos, experimentation, and edge/CPU inference β not production use.
License / attribution
Released under CC BY-NC 4.0 (non-commercial, attribution required). The finetune mixes datasets with non-commercial terms (Alpaca, CodeAlpaca, ShareGPT β OpenAI-derived), so commercial use is not granted. Trained on publicly available datasets (FineWeb-Edu, Alpaca, Dolly, CodeAlpaca, ShareGPT); review each dataset's license before redistributing derived outputs.
Made with care
rb-nano was built by Rafi (13 years old) and Buddi (10 years old) β pretrained and finetuned from scratch on a single RTX 4070 (8 GB VRAM). It's a passion project: proof that a coherent little chat model can be trained end-to-end on consumer hardware.
If you enjoy it and want to support more experiments like this, you can buy us a coffee β. Thank you for trying rb-nano β we hope you like it.
rb-super might come
we plan to make rb-super 120 milion parameters
- Downloads last month
- 185
16-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leopard-Ai/rb-nano-GGUF", filename="rb-nano-f16.gguf", )