Text Generation
GGUF
English
flatbuild
language-model
conversational
flatseek
flatrun
trained-from-scratch
rope
rmsnorm
swiglu
gqa
Instructions to use flatseek/flatbot-micro-4M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use flatseek/flatbot-micro-4M 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 flatseek/flatbot-micro-4M # Run inference directly in the terminal: llama cli -hf flatseek/flatbot-micro-4M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf flatseek/flatbot-micro-4M # Run inference directly in the terminal: llama cli -hf flatseek/flatbot-micro-4M
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 flatseek/flatbot-micro-4M # Run inference directly in the terminal: ./llama-cli -hf flatseek/flatbot-micro-4M
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 flatseek/flatbot-micro-4M # Run inference directly in the terminal: ./build/bin/llama-cli -hf flatseek/flatbot-micro-4M
Use Docker
docker model run hf.co/flatseek/flatbot-micro-4M
- LM Studio
- Jan
- vLLM
How to use flatseek/flatbot-micro-4M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flatseek/flatbot-micro-4M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flatseek/flatbot-micro-4M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flatseek/flatbot-micro-4M
- Ollama
How to use flatseek/flatbot-micro-4M with Ollama:
ollama run hf.co/flatseek/flatbot-micro-4M
- Unsloth Studio
How to use flatseek/flatbot-micro-4M 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 flatseek/flatbot-micro-4M 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 flatseek/flatbot-micro-4M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for flatseek/flatbot-micro-4M to start chatting
- Docker Model Runner
How to use flatseek/flatbot-micro-4M with Docker Model Runner:
docker model run hf.co/flatseek/flatbot-micro-4M
- Lemonade
How to use flatseek/flatbot-micro-4M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull flatseek/flatbot-micro-4M
Run and chat with the model
lemonade run user.flatbot-micro-4M-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
File size: 4,213 Bytes
554d3d6 6936517 83e4786 6936517 554d3d6 6936517 f99ed92 6936517 9eb8b76 83e4786 6936517 9eb8b76 6936517 9eb8b76 6936517 9eb8b76 6936517 9eb8b76 6936517 9eb8b76 6936517 f99ed92 07b41d8 9eb8b76 07b41d8 6936517 9eb8b76 6936517 83e4786 07b41d8 9eb8b76 07b41d8 9eb8b76 07b41d8 6936517 9eb8b76 6936517 9eb8b76 6936517 9eb8b76 6936517 9eb8b76 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | ---
license: apache-2.0
language:
- en
library_name: flatbuild
tags:
- language-model
- conversational
- flatseek
- flatbuild
- flatrun
- trained-from-scratch
- rope
- rmsnorm
- swiglu
- gqa
pipeline_tag: text-generation
---
# Flatbot-micro-4M
**Try it online:** https://chat.flatseek.io
Flatbot-micro-4M is the flagship demonstration model for **Flatseek**.
It is a compact conversational language model trained entirely from scratch using the Flatseek ecosystem. Rather than competing with large language models, Flatbot demonstrates the complete lifecycle of building an AI model—from dataset creation and tokenizer training to transformer training, checkpoint export, and inference.
Powered by a **4.1M-parameter** language model in just **20 MB**, Flatbot was trained from scratch on approximately **2,500 conversational examples**, built with **FlatBuild**, and served by **FlatRun**.
> **Experimental model:** Expect occasional hallucinations, factual errors, and inconsistent responses. Flatbot is intended for learning, experimentation, and showcasing the Flatseek ecosystem rather than production use.
## Architecture
| Component | Details |
|---|---|
| Architecture | Decoder-only Transformer |
| Position Encoding | RoPE |
| Normalization | RMSNorm |
| Feed Forward | SwiGLU |
| Attention | Grouped Query Attention (8 Query Heads / 4 KV Heads) |
| Weight Tying | Yes |
| Context Length | 384 |
| Parameters | ~4.1M |
## Model Configuration
```text
vocab_size = 512
hidden_size = 256
num_layers = 6
num_heads = 8
num_kv_heads = 4
head_dim = 32
ffn_dim = 768
context_length = 384
rope_theta = 10000
```
## Training
The model was trained completely from random initialization using FlatBuild.
### Dataset
| Property | Value |
|---|---:|
| Conversations | ~2,500 |
| Multi-turn conversations | ~55% |
| Train Split | 95% |
| Validation Split | 5% |
| Context Length | 384 tokens |
The dataset contains general-purpose conversations including greetings, introductions, recommendations, explanations, simple reasoning, follow-up questions, and everyday dialogue.
## Training Configuration
| Hyperparameter | Value |
|---|---:|
| Optimizer | AdamW |
| Learning Rate | 1e-3 |
| Scheduler | Cosine |
| Warmup | 20 steps |
| Epochs | 12 |
| Batch Size | 4 |
| Gradient Accumulation | 2 |
| Precision | FP32 |
## Features
- Trained entirely from scratch
- Custom tokenizer
- Native chat template
- RoPE positional embeddings
- RMSNorm
- SwiGLU
- Grouped Query Attention (GQA)
- Weight-tied embeddings
- SafeTensors export
- GGUF export
- Native FlatRun compatibility
## Usage
### FlatBuild Training
```bash
pip install flatbuild
flatbuild train config/demo_chat.yml
flatbuild export output/demo_chat/*/checkpoint/final --format gguf --output flatbot-micro-4M
```
### LM Studio
```bash
lms import flatbot-micro-4M/model.gguf
```
### FlatRun Inference
```bash
pip install flatrun
flatrun chat --model flatbot-micro-4M.gguf --temp 0.2
```
```text
Detected format: gguf
Building tokenizer from GGUF metadata (flatbot-micro-4M.gguf) ...
Tokenizer vocab: 516
Chat template: {% if messages and messages[0]['role'] != 'system' %}{{ 'You...
Loaded model in 0.01 s; layers=6
Chat mode (max_new=128/turn, history=True). Type your message; Ctrl-D (EOF) or 'exit' to quit.
You: Who are you?
Assistant:
Sure — I'm Flatbot — I'm Flatbot — an assistant trained on a sm a sm chat assistant.
(30 tokens, 0.9s, 35.0 tok/s)
```
## Purpose
Flatbot-micro-4M demonstrates the complete Flatseek pipeline:
1. Build a dataset
2. Train a tokenizer
3. Configure a transformer
4. Train from scratch
5. Export checkpoints
6. Convert to GGUF
7. Run inference with FlatRun
The entire workflow is reproducible on consumer hardware and is designed for education, experimentation, and research.
## Limitations
Flatbot-micro-4M is a compact language model trained on a relatively small dataset. Compared with modern large language models, it has limited factual knowledge, reasoning ability, and context capacity. Its primary purpose is to demonstrate an end-to-end open-source training and inference pipeline, not to serve as a production-grade AI assistant. |