Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Property Value
Parameters ~4.8 Million
Size ~19 MB
Format GGUF (F16)
Architecture Decoder-only Transformer
Context Length 512 tokens
Runtime Flatrun
Training From random initialization

Architecture

Component Details
Position Encoding RoPE
Normalization RMSNorm
Feed Forward SwiGLU
Attention Grouped Query Attention (GQA)
Weight Tying Yes

Training

The model was trained entirely from random initialization using FlatBuild.

Property Value
Conversations ~2,500
Training Split 95%
Validation Split 5%
Dataset General 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

Variable Default Description
MODEL_PATH ./model Path to the GGUF model
CACHE_MB 256 KV 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.