Sahar 110M (سحر, "dawn")

Sahar is a small (~110M parameter) language model trained from scratch by Aavesh Jilani: own byte-level BPE tokenizer (32k vocab), own Llama-style transformer implementation, own training code. No pretrained weights and no borrowed tokenizer were used.

  • Architecture: decoder-only, 12 layers, 12 heads, d_model 768, RoPE, RMSNorm, SwiGLU, tied embeddings, 1024 context
  • Pretraining: about 1B tokens, English (FineWeb-Edu) plus Hindi and Urdu (FineWeb-2)
  • Chat tuning: supervised fine-tuning on smol-smoltalk, Dolly-15k, OpenAssistant (oasst1) and a few hundred identity examples with loss on assistant replies only

Files

file what
model.safetensors, config.json PyTorch weights (tied output layer not stored)
tok.json tokenizer (BPE merges)
*.gguf llama.cpp format (f16 / q8_0)
model.py, bpe.py, chatfmt.py, chat.py, gguf_chat.py, to_gguf.py, check_tokenization.py code to load and run it

Run it

PyTorch (needs the files from this repo):

pip install torch regex safetensors
python chat.py --ckpt model.safetensors --tok tok.json

GGUF on CPU (uses Sahar's own tokenizer, recommended):

pip install llama-cpp-python gguf regex
python gguf_chat.py --gguf sahar-110m-q8_0.gguf --tok tok.json

Ollama:

ollama run aaveshj/sahar:latest

Limitations (please read)

  • It is a very small model. It makes up facts, repeats itself and often drifts off topic. Do not rely on its answers.
  • Part of the chat data comes from human-written assistants, so it may occasionally call itself "Open Assistant". The chat scripts start every conversation with a short built-in intro (Sahar, made by Aavesh Jilani); --no-intro turns it off.
  • Ollama / LM Studio / llama-cli tokenize with llama.cpp's built-in GPT-2 rules. For English text, numbers and the chat markers these match Sahar's tokenizer exactly (check_tokenization.py verifies it); Hindi text with vowel signs is split differently, so Hindi answers can degrade there. gguf_chat.py uses Sahar's own tokenizer.
  • Hindi/Urdu ability is limited and the chat tuning is mostly English.

Training data and licenses

Pretraining: FineWeb-Edu and FineWeb-2 (ODC-By). Chat tuning: smol-smoltalk (Apache-2.0), Dolly-15k (CC BY-SA 3.0), oasst1 (Apache-2.0). Check the licenses of these datasets before reusing the model commercially.

Author

Aavesh Jilani

Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support