Instructions to use henryhale/Kintu-2.0-30M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use henryhale/Kintu-2.0-30M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="henryhale/Kintu-2.0-30M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("henryhale/Kintu-2.0-30M") model = AutoModelForCausalLM.from_pretrained("henryhale/Kintu-2.0-30M", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use henryhale/Kintu-2.0-30M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "henryhale/Kintu-2.0-30M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "henryhale/Kintu-2.0-30M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/henryhale/Kintu-2.0-30M
- SGLang
How to use henryhale/Kintu-2.0-30M 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 "henryhale/Kintu-2.0-30M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "henryhale/Kintu-2.0-30M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "henryhale/Kintu-2.0-30M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "henryhale/Kintu-2.0-30M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use henryhale/Kintu-2.0-30M with Docker Model Runner:
docker model run hf.co/henryhale/Kintu-2.0-30M
Kintu-2.0-30M
A 30M-parameter Luganda chat model and the successor to Kintu-1.0-39M: Kintu-2.0-30M-Base fine-tuned on Luganda conversations.
| Architecture | Qwen3-style decoder (Qwen3ForCausalLM): RMSNorm, SwiGLU, RoPE (θ = 1e6), QK-norm, grouped-query attention (8 query / 4 KV heads), tied embeddings |
| Size | 30.0M parameters: 8 layers, hidden size 512, MLP 1,664 |
| Tokenizer | Byte-level BPE, 6,400 tokens, trained on the pretraining data |
| Context | 512 tokens |
Training
Full fine-tuning on 59,798 Luganda prompt-reply pairs (the empathetic-dialogue and everyday-conversation subsets of henryhale/luganda-sft-translated) for 3 epochs : learning rate 5e-5 and 685 multi-turn Luganda converstations of henryhale/luganda-lima for 3 epochs : learning rate 2e-5with cosine decay, fp16 on one T4. Loss is only computed on the assistant's replies.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("henryhale/Kintu-2.0-30M")
model = AutoModelForCausalLM.from_pretrained("henryhale/Kintu-2.0-30M")
messages = [{"role": "user", "content": "Oli otya?"}]
enc = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**enc, max_new_tokens=100)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))
Samples
Sampled with temperature 0.85 and top-p 0.95:
💬 Oli otya?
🧠 Gezaako okukuumira ebirowoozo byo mu kamwa ko era weeyongere okunyweza omubiri gwo.
💬 Wasuze otya nno?
🧠 Wasuze otya naawe! Ndi muzadde omulungi nnyo! Ggwe osiibye otya?
💬 Osiibye otyanno ssebo?
🧠 Nsiibye bulungi. Oluggi luno lwakumala bbanga ki?
💬 Ndi musanyufu nnyo okulaba.
🧠 Nzikirizza kampuni ey'eby'enfuna n'eby'abakozi abakugu.
💬 Weebale nnyo okuyamba bulungi.
🧠 Ssanyu lyange. Ssanyu lyange. Olina omulimu?
Limitations
At 30M parameters it writes fluent Luganda but is often off-topic and gets facts wrong, so don't rely on it for information. It was trained on sequences of up to 512 tokens, and TinyStories translations are 68.5% of its pretraining tokens, so it leans towards simple stories.
- Downloads last month
- 16