Instructions to use hzlo0/lilo-100m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hzlo0/lilo-100m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hzlo0/lilo-100m")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hzlo0/lilo-100m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hzlo0/lilo-100m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hzlo0/lilo-100m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hzlo0/lilo-100m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hzlo0/lilo-100m
- SGLang
How to use hzlo0/lilo-100m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "hzlo0/lilo-100m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hzlo0/lilo-100m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "hzlo0/lilo-100m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hzlo0/lilo-100m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hzlo0/lilo-100m with Docker Model Runner:
docker model run hf.co/hzlo0/lilo-100m
lilo-100m
Lightweight Local Intelligence & Optimizer
A ~110M parameter Indonesian chat model built on the DeepSeek-V4 architecture, re-packaged from neosantara/wader-100m for one purpose: running fast and stable on CPU, on a tiny VPS, without ever OOMing.
- Trained from scratch upstream (no DeepSeek-V4 weights used): base
neosantara/wader-100m-baseβ SFTneosantara/wader-100m - Same weights, same quality β re-packaged: quantized, de-bugged, and tuned for CPU decode.
What you get
| Variant | Weights file | Size | Quality vs original fp32 | CPU speed (2 vCPU) |
|---|---|---|---|---|
| fp16 (default) | model.fp16.safetensors |
221MB | PPL +0.08%, outputs 5/5 identical | 67 tok/s warm Β· 14β22 tok/s under load |
| int8 | model.int8.safetensors |
119MB (β73%) | PPL +0.32%, outputs 5/5 identical | 9β19 tok/s |
- int8 = symmetric, group-wise (group=64) weight-only quantization on every
nn.Linear+ embedding. Norms, MoE router, and Hyper-Connection params stay fp32. - On a Zen2/AVX2 CPU (no VNNI), fp16 GEMM beats int8 β so int8's win is disk size and RAM, fp16's win is speed. Pick by constraint.
Quick start
git lfs install
git clone https://huggingface.co/hzlo0/lilo-100m
cd lilo-100m
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install transformers safetensors tokenizers accelerate
bash run_cpu.sh # interactive chat (fp16)
python chat_lilo.py "Halo, apa kabar?" # one-shot
python chat_lilo.py --variant int8 "Halo" # 119MB variant
Flags: --variant fp16|int8 Β· --threads Β· --max Β· --temp Β· --top-p Β· --rep Β· --system Β· --path
Minimal Python:
import torch
from lilo_common import load_lilo, chat
torch.set_num_threads(1)
tok, model = load_lilo(".", variant="fp16") # or "int8"
print(chat(tok, model, [{"role": "user", "content": "Halo, apa kabar?"}]))
trust_remote_code is not required β modeling_deepseek_v4.py ships alongside the weights and is loaded directly. (AutoModelForCausalLM.from_pretrained(..., trust_remote_code=True) also works if you prefer.)
Made stable on CPU
The upstream checkpoint was GPU-only and broken for CPU. Fixed in this release:
- RoPE corrupted on CPU β
freqs_ciswas left as an uninitialized buffer after meta-device loading β garbage logits past a few tokens. Now recomputed on demand. - No KV cache β the original forward hardcoded
use_cache=False, recomputing the entire sequence for every generated token. Now cached + single-token stepping. - Broken return type β under transformers 5.x,
config.use_return_dictis deprecated and silently returned tuples instead of.logits. - int8 dtype bridge β expert activations were cast to int8 through
w2.weight.dtypeunder weight quantization. - No bf16 anywhere β runs fp16/fp32, no NaN overflow.
Never OOM
Measured peak RSS on a 2 vCPU / 1.9GB RAM VPS, from a clean clone:
- fp16: ~440MB Β· int8: ~490MB (weights + torch runtime)
Baked into run_cpu.sh:
OMP_NUM_THREADS+MALLOC_ARENA_MAX=1β stops glibc from reserving one arena per threadTMPDIRforced to disk, never tmpfs (/tmpcounts as RAM!)- prefill chunked at 256 tokens β never allocates a big
[S, S]attention matrix
Identity β "siapa namamu?"
This model is the wader-100m weights retrained under a new name β it was never taught the name LILO, so asking "siapa namamu?" makes it deflect or change topic (normal for an undertrained 110M model). Set identity via system prompt:
python chat_lilo.py --system "Namamu adalah LILO (Lightweight Local Intelligence & Optimizer), asisten buatan hzlo0." "Siapa namamu?"
Keep system prompts short and explicit β long ones get ignored. To bake the identity in, do a small SFT run (1β5k dialogs mentioning LILO) on top of this repo.
Architecture
| Component | Details |
|---|---|
| Parameters | ~110M (41M embeddings, 69M non-embedding) |
| Hidden size | 320 Β· 8 layers |
| Attention | 8 heads, 1 KV head (MQA), MLA with q_lora_rank=160, grouped low-rank output projection |
| MoE | 4 routed experts + 1 shared, top-2 routing |
| Hyper-Connections | hc_mult=4, Sinkhorn routing (replaces the residual stream) |
| Vocab | 129,280 (DeepSeek-V4 tokenizer) Β· context 2,048 tokens |
Limitations
- Small model. 110M params, most capacity in embeddings. Generations are frequently incoherent or factually wrong.
- Undertrained. 5K pretrain + 3K SFT steps upstream. Production models train 100K+ steps on trillions of tokens.
- Name-blind. See the identity section above.
License
Apache-2.0, inherited from neosantara/wader-100m.
Model tree for hzlo0/lilo-100m
Base model
neosantara/wader-100m-base