Instructions to use DedeProGames/Kiyo-135M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DedeProGames/Kiyo-135M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DedeProGames/Kiyo-135M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DedeProGames/Kiyo-135M") model = AutoModelForCausalLM.from_pretrained("DedeProGames/Kiyo-135M", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DedeProGames/Kiyo-135M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DedeProGames/Kiyo-135M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DedeProGames/Kiyo-135M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DedeProGames/Kiyo-135M
- SGLang
How to use DedeProGames/Kiyo-135M 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 "DedeProGames/Kiyo-135M" \ --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": "DedeProGames/Kiyo-135M", "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 "DedeProGames/Kiyo-135M" \ --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": "DedeProGames/Kiyo-135M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DedeProGames/Kiyo-135M with Docker Model Runner:
docker model run hf.co/DedeProGames/Kiyo-135M
Kiyo-135M
Kiyo-135M is a decoder-only language model pretrained from scratch on 200B tokens drawn from FineWeb-Edu, DCLM-Baseline, FineMath, and Stack-v3-train.
The model follows the SmolLM2-135M architecture: a Llama-style decoder with grouped query attention, RMSNorm, SwiGLU MLPs, and tied input/output embeddings. SmolLM2 was chosen as a base architecture because it is specifically tuned for small-scale pretraining efficiency — narrow hidden size with a comparatively deep layer stack, and a large 49k-token vocabulary that keeps sequence lengths short for a model this size. Kiyo-135M reuses this architecture but is trained independently from a random initialization on its own data mixture, rather than starting from SmolLM2's own weights.
Model Details
| Field | Value |
|---|---|
| Parameters | 134,515,008 |
| Architecture | Llama-style decoder (SmolLM2 architecture) |
| Layers | 30 |
| Hidden size | 576 |
| Intermediate size | 1,536 |
| Attention heads | 9 |
| KV heads | 3 |
| Attention type | Grouped query attention |
| Activation | SwiGLU |
| Normalization | RMSNorm |
| Positional encoding | RoPE (theta 100,000) |
| Vocabulary size | 49,152 |
| Context length | 8,192 |
| Embeddings | Tied input/output embeddings |
| Training tokens | 200,000,000,000 |
| Weight format | safetensors |
Training Data
| Source | Domain |
|---|---|
| FineWeb-Edu | General web text, education-filtered |
| DCLM-Baseline | General web text, high-quality filtered |
| FineMath | Mathematical reasoning |
| Stack-v3-train | Source code |
Benchmarks
Self-reported results from the official BananaMind Base Bench 1.1 script, all measured with the same runner, dtype (bfloat16) and GPU.
| Model | Params | Overall Elo |
|---|---|---|
| Kiyo-135M | 134.5M | 1,126 |
| BananaMind-2-Pro | 139.0M | 1,124 |
| Rose-Pro | 151.3M | 1,105 |
| GPT-2 | 124M | 990 |
Figures for BananaMind-2-Pro, Rose-Pro, and GPT-2 are as self-reported on their own model cards, all against the same BananaMind Base Bench 1.1 suite.
Detailed Kiyo-135M result
| Category | Accuracy | z vs. chance | Elo | Significant |
|---|---|---|---|---|
| Language completion | 100.0% | +12.25 | 1,570 | * |
| Code completion | 86.0% | +9.96 | 1,420 | * |
| World knowledge | 80.0% | +8.98 | 1,151 | * |
| Commonsense | 74.0% | +8.00 | 1,110 | * |
| Logical reasoning | 58.0% | +5.39 | 1,118 | * |
| Context tracking | 44.0% | +3.10 | 914 | * |
| Quantitative | 32.0% | +1.14 | 913 |
* = passes 1.96σ vs. chance; n=50 per category
By difficulty
| Difficulty | Accuracy |
|---|---|
| Easy | 76.9% |
| Medium | 69.2% |
| Hard | 56.9% |
Summary
| Metric | Value |
|---|---|
| Parameters | 134,515,008 |
| Overall Elo | 1,126 |
| Chance floor | 805 |
| Above chance floor | +321 |
| Raw accuracy | 67.7% |
Scores are self-evaluated and may vary with the benchmark revision, Transformers version, dtype, hardware, and generation settings.
Usage
pip install -U transformers safetensors torch
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "DedeProGames/Kiyo-135M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16,
).cuda().eval()
prompt = "The meaning of life is "
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(model.device)
with torch.no_grad():
output = model.generate(
input_ids=input_ids,
max_new_tokens=64,
do_sample=False,
repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Limitations
This is a base model, not instruction-tuned — it continues text rather than following instructions. At 135M parameters it produces fluent, well-structured text and is strong on language completion and code, but accuracy drops on quantitative and multi-step context-tracking tasks. It can generate incorrect facts and should not be used for high-stakes decisions without verification. Keep a finite generation limit to avoid repetition or drift on long outputs.
License
Apache 2.0
- Downloads last month
- -
Model tree for DedeProGames/Kiyo-135M
Base model
HuggingFaceTB/SmolLM2-135M