Instructions to use aaveshj/sahar-110m 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 aaveshj/sahar-110m 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 aaveshj/sahar-110m:F16 # Run inference directly in the terminal: llama cli -hf aaveshj/sahar-110m:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aaveshj/sahar-110m:F16 # Run inference directly in the terminal: llama cli -hf aaveshj/sahar-110m:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf aaveshj/sahar-110m:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf aaveshj/sahar-110m:F16
Use Docker
docker model run hf.co/aaveshj/sahar-110m:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use aaveshj/sahar-110m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aaveshj/sahar-110m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aaveshj/sahar-110m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aaveshj/sahar-110m:F16
- Ollama
How to use aaveshj/sahar-110m with Ollama:
ollama run hf.co/aaveshj/sahar-110m:F16
- Unsloth Desktop
- Docker Model Runner
How to use aaveshj/sahar-110m with Docker Model Runner:
docker model run hf.co/aaveshj/sahar-110m:F16
- Lemonade
How to use aaveshj/sahar-110m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aaveshj/sahar-110m:F16
Run and chat with the model
lemonade run user.sahar-110m-F16
List all available models
lemonade list
- Atomic Chat
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-introturns it off. - Ollama / LM Studio /
llama-clitokenize 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.pyverifies it); Hindi text with vowel signs is split differently, so Hindi answers can degrade there.gguf_chat.pyuses 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
- -