5 Downloads Updated yesterday
ollama run theunwindfront/indus-5m

indus-5m is a lightweight, 100% from-scratch conversational LLM trained with a custom SentencePiece BPE tokenizer and randomly initialized Transformer weights (zero 3rd-party pre-trained weights), exported to GGUF and published on Ollama:
ollama run theunwindfront/indus-5m| Model Name | Parameters | Architecture | Tokenizer | Format | Size |
|---|---|---|---|---|---|
indus-5m |
5.52M | Decoder-only Transformer (Llama-style) | Custom SentencePiece BPE (800 vocab + byte fallback) | GGUF (Q8_0) |
5.88 MB |
num_hidden_layers): 6num_attention_heads): 4hidden_size): 256intermediate_size): 768max_position_embeddings): 512vocab_size=800, byte_fallback=True, custom <|system|>, <|user|>, <|assistant|> tokens)torch, transformers, datasets, accelerate, sentencepiece, protobufllama.cpp (convert_hf_to_gguf.py) + ggufdata/train.jsonl)Because indus-5m starts from random weights (no 3rd-party pre-trained knowledge), it learns grammar, tone, and domain facts exclusively from your dataset.
Format each conversation as one JSON object per line:
{"messages": [{"role": "system", "content": "..."}, {"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}
| Stage | Dataset Volume | Expected Capability |
|---|---|---|
| Pipeline Test | 10–100 conversations | Verifies tokenization, training, GGUF export, and Ollama serving end-to-end |
| Narrow Domain Bot | 50,000–200,000+ conversations (10M–50M tokens) | Handles structured, predictable industry dialogues |
| Fluent Multi-Industry Chat | Millions of dialogues + general text (1B+ tokens) | Natural, flexible multi-turn conversation |
| Model Scale | Example Config | Recommended Hardware |
|---|---|---|
| Tiny (~5M–15M params) | --layers 6 --hidden-size 256 --heads 4 --vocab-size 800 |
CPU (16 GB RAM) — great for pipeline testing |
| Small (~50M–150M params) | --layers 12 --hidden-size 512 --heads 8 --vocab-size 16000 |
1x GPU (16–24 GB VRAM) |
| Medium (~300M–1B params) | --layers 16 --hidden-size 1024 --heads 16 --vocab-size 32000 |
1–4x A100/H100 GPUs |
data/train.jsonl — Multi-industry conversational training dataset (messages format).scripts/train_from_scratch.py — Trains the custom SentencePiece tokenizer and Transformer model from scratch into outputs/scratch_model/.scripts/push_to_ollama.py — Uploads exports/indus-5m.gguf to Ollama and registers indus-5m.ollama/Modelfile — Ollama model configuration.exports/indus-5m.gguf — Quantized (Q8_0) GGUF model file for Ollama.architecture.gif — Animated architecture & pipeline diagram.requirements.txt — Python dependencies.uv venv --python python3.12 .venv
uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cpu
uv pip install --python .venv/bin/python -r requirements.txt
.venv/bin/python scripts/train_from_scratch.py --epochs 20
git clone --depth 1 https://github.com/ggml-org/llama.cpp /tmp/llama.cpp
mkdir -p exports
.venv/bin/python /tmp/llama.cpp/convert_hf_to_gguf.py outputs/scratch_model --outfile exports/indus-5m.gguf --outtype q8_0
python3 scripts/push_to_ollama.py --gguf exports/indus-5m.gguf --name indus-5m
curl http://localhost:11434/api/chat -d '{
"model": "indus-5m:latest",
"messages": [{"role": "user", "content": "Hi"}],
"stream": false
}'
healthcare, ecommerce, realestate, fintech, hospitality), and vocabulary coverage.data/train.jsonl. Scale dataset size and model dimensions before production use.[!CAUTION] Check each dataset’s licence before you redistribute a trained model. When expanding
data/train.jsonlwith external or industry datasets, treatindus-5mweights as research-only until upstream data terms are confirmed.
Code in this repository is released under the Apache License 2.0. Released model weights (indus-5m) are Apache-2.0 as well, subject to the terms of their training data (see above).
If this helped you, consider giving it a ⭐