Skip to content

Repository files navigation

Flatbot

The official chat interface for Flatbot-micro-4M, a tiny language model trained from scratch.

Flatbot Chat Interface

Flatbot is the official playground for Flatbot-micro-4M, a compact conversational language model built entirely from scratch using the Flatseek ecosystem.

This repository bundles the model, a modern ChatGPT-style web interface, and OpenAI-compatible APIs into a single application, making it easy to explore, deploy, and experiment with one of the smallest end-to-end language models available.

Unlike projects focused solely on inference, Flatbot showcases the complete lifecycle of an LLM—from tokenizer training and transformer training to GGUF export, streaming inference, and browser-based interaction.

Try it online:https://chat.flatseek.io
Download the model:https://huggingface.co/flatseek/flatbot-micro-4M


Flatbot-micro-4M

Flatbot-micro-4M is the flagship demonstration model of the Flatseek ecosystem.

Rather than competing with large foundation models, it demonstrates how a complete conversational AI model can be built from scratch using open-source tooling. The model is intentionally compact, making it suitable for education, experimentation, edge deployments, and understanding how modern LLMs work internally.

Experimental model: Flatbot is intended for learning and experimentation. Expect occasional hallucinations, factual inaccuracies, and inconsistent responses.

Model Overview

PropertyValue
Parameters~4.8 Million
Size~19 MB
FormatGGUF (F16)
ArchitectureDecoder-only Transformer
Context Length512 tokens
RuntimeFlatrun
TrainingFrom random initialization

Architecture

ComponentDetails
Position EncodingRoPE
NormalizationRMSNorm
Feed ForwardSwiGLU
AttentionGrouped Query Attention (GQA)
Weight TyingYes

Training

The model was trained entirely from random initialization using FlatBuild.

PropertyValue
Conversations~2,500
Training Split95%
Validation Split5%
DatasetGeneral conversational dialogue

Chat Interface

Flatbot Chat Interface

Flatbot includes a lightweight browser-based interface for interacting with Flatbot-micro-4M.

Live Demo

https://chat.flatseek.io

Features

  • ChatGPT-style interface
  • Real-time streaming responses
  • Bundled Flatbot-micro-4M model
  • CPU-only inference
  • No external inference server
  • OpenAI-compatible API
  • Anthropic-compatible API
  • Deployable on Vercel

API

Flatbot exposes APIs compatible with popular LLM clients.

OpenAI

POST /v1/chat/completions

Anthropic

POST /v1/messages

Additional Endpoints

GET /v1/models
GET /healthz

Example

curl https://chat.flatseek.io/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model":"flatbot", "messages":[ { "role":"user", "content":"Hello!" } ] }'

Streaming is enabled with:

{
"stream": true
}

Running Locally

pip install -r requirements.txt
uvicorn api.index:app --reload --port 8000

Open:

http://localhost:8000

Environment Variables

VariableDefaultDescription
MODEL_PATH./modelPath to the GGUF model
CACHE_MB256KV cache size

Limitations

  • CPU-only inference
  • Cold-start model loading
  • One active generation per instance
  • Vercel Hobby plans have a 10-second execution limit

Part of the Flatseek Ecosystem


Flatbot demonstrates that a complete conversational AI stack—from training a language model to serving it through a modern chat interface—can fit into a compact, fully open-source project.

Releases

Packages

Contributors

Languages