Instructions to use aethertp/PicoLM-80M-Instruct 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 aethertp/PicoLM-80M-Instruct 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 aethertp/PicoLM-80M-Instruct # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-80M-Instruct
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aethertp/PicoLM-80M-Instruct # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-80M-Instruct
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 aethertp/PicoLM-80M-Instruct # Run inference directly in the terminal: ./build/bin/llama cli -hf aethertp/PicoLM-80M-Instruct
Use Docker
docker model run hf.co/aethertp/PicoLM-80M-Instruct
- Llama new
- LM Studio
- Jan
- vLLM
How to use aethertp/PicoLM-80M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aethertp/PicoLM-80M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aethertp/PicoLM-80M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aethertp/PicoLM-80M-Instruct
- Ollama
How to use aethertp/PicoLM-80M-Instruct with Ollama:
ollama run hf.co/aethertp/PicoLM-80M-Instruct
- Unsloth Desktop
- Docker Model Runner
How to use aethertp/PicoLM-80M-Instruct with Docker Model Runner:
docker model run hf.co/aethertp/PicoLM-80M-Instruct
- Lemonade
How to use aethertp/PicoLM-80M-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aethertp/PicoLM-80M-Instruct
Run and chat with the model
lemonade run user.PicoLM-80M-Instruct-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- README.md +102 -0
- chat_template.jinja +4 -0
- config.json +17 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +8 -0
README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- text-generation
|
| 7 |
+
- conversational
|
| 8 |
+
- pytorch
|
| 9 |
+
- safetensors
|
| 10 |
+
- causal-lm
|
| 11 |
+
- slm
|
| 12 |
+
- on-device
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
widget:
|
| 15 |
+
- text: "<|im_start|>user\nWhat is the capital of France?<|im_end|>\n<|im_start|>assistant\n"
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# PicoLM-80M-Instruct π
|
| 19 |
+
|
| 20 |
+
**PicoLM-80M-Instruct** is an ultra-compact, 80.24-million parameter causal language model designed for extreme efficiency, fast inference, and on-device deployment.
|
| 21 |
+
|
| 22 |
+
Trained completely from scratch on Kaggle dual Tesla T4 GPUs with zero budget, PicoLM-80M proves what can be achieved through strict modern architecture optimizations (SwiGLU, Grouped-Query Attention, RMSNorm, QK-Norm, and Tied Embeddings) paired with dense educational synthetic data.
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## π Model Overview
|
| 27 |
+
|
| 28 |
+
- **Developer:** Emre Polat
|
| 29 |
+
- **Parameters:** 80,242,240 (~80.2M)
|
| 30 |
+
- **Context Window:** 2,048 tokens
|
| 31 |
+
- **Vocabulary:** 16,384 (Single-digit regex split, Byte-level BPE)
|
| 32 |
+
- **Format:** Safetensors (FP16)
|
| 33 |
+
- **Primary Language:** English + Python Code
|
| 34 |
+
- **License:** Apache 2.0
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## π Empirical Benchmark Results (Verified)
|
| 39 |
+
|
| 40 |
+
Unlike models with estimated metrics, all scores below were **empirically measured** directly on the model weights using standard log-likelihood evaluations:
|
| 41 |
+
|
| 42 |
+
| Benchmark / Task | Random Baseline | SmolLM2-135M (HF) | Gemma 3 270M (Google) | PicoLM-80M-Instruct (Ours) |
|
| 43 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 44 |
+
| **HellaSwag (Commonsense)** | 25.00% | 42.10% | 37.70% | **31.20%** *(+6.2% above random)* |
|
| 45 |
+
| **ARC-Easy (Science QA)** | 25.00% | 58.50% | 57.70% | **25.60%** *(Floor effect)* |
|
| 46 |
+
| **Validation Perplexity** | ~16,384 | β | β | **14.65** |
|
| 47 |
+
| **Factual QA ("Capital of France")** | Hallucination | Factual | Factual | **"The capital of France is Paris."** |
|
| 48 |
+
| **Stop Token Discipline** | Loops | Strict | Strict | **100% strict `<|im_end|>` termination** |
|
| 49 |
+
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
## ποΈ Architecture Specifications
|
| 53 |
+
|
| 54 |
+
- **Layers:** 20 Transformer blocks (Deep & Thin)
|
| 55 |
+
- **Hidden Dimension ($d_{model}$):** 576
|
| 56 |
+
- **Attention Heads (Q):** 9 (Head dim = 64)
|
| 57 |
+
- **KV Heads (GQA):** 3 (3:1 Grouped-Query Attention)
|
| 58 |
+
- **Intermediate Dimension:** 1536 (SwiGLU)
|
| 59 |
+
- **Normalization:** Pre-RMSNorm with **QK-Norm** (prevents attention logit blowup)
|
| 60 |
+
- **Positional Encoding:** RoPE ($ heta = 10000$)
|
| 61 |
+
- **Weights Tying:** Input embeddings and LM Head weights are shared (Zero parameter waste)
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## π Training Curriculum
|
| 66 |
+
|
| 67 |
+
1. **Pre-Training (Stage 1 - ~307M Tokens):**
|
| 68 |
+
- 54% Cosmopedia v2 (Textbooks & reasoning)
|
| 69 |
+
- 23% FineWeb-Edu Dedup (Educational web articles)
|
| 70 |
+
- 12% Python-Edu (Algorithms and code syntax)
|
| 71 |
+
- 11% SmolTalk Dialogues
|
| 72 |
+
- Optimization: WSD (Warmup-Stable-Decay) across 2x Tesla T4 GPUs.
|
| 73 |
+
2. **Chat Alignment (Stage 2 - SFT):**
|
| 74 |
+
- 15,000 curated dialogues from SmolTalk.
|
| 75 |
+
- Strict Prompt-Masking (`ignore_index = -100`) applied so only assistant responses receive loss updates.
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
## π» Quickstart Inference
|
| 80 |
+
|
| 81 |
+
```python
|
| 82 |
+
import torch
|
| 83 |
+
from transformers import PreTrainedTokenizerFast
|
| 84 |
+
|
| 85 |
+
# Load tokenizer
|
| 86 |
+
tokenizer = PreTrainedTokenizerFast.from_pretrained("aethertp/PicoLM-80M-Instruct")
|
| 87 |
+
|
| 88 |
+
# Format prompt using ChatML
|
| 89 |
+
user_prompt = "What is the capital of France?"
|
| 90 |
+
formatted = f"<|im_start|>user\n{user_prompt}<|im_end|>\n<|im_start|>assistant\n"
|
| 91 |
+
input_ids = torch.tensor([tokenizer.encode(formatted, add_special_tokens=False)])
|
| 92 |
+
|
| 93 |
+
# Generate response
|
| 94 |
+
# (Model weights available in model.safetensors)
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## β οΈ Limitations
|
| 100 |
+
|
| 101 |
+
- **Factual Depth:** With 80M parameters, the model cannot serve as a reliable encyclopedia for obscure facts. Factual queries should be supported by RAG.
|
| 102 |
+
- **Multi-step Math:** Elementary arithmetic works, but multi-variable algebra requires external verification.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{{'<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>' + '
|
| 3 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"PicoLMForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "picolm",
|
| 6 |
+
"vocab_size": 16384,
|
| 7 |
+
"hidden_size": 576,
|
| 8 |
+
"num_hidden_layers": 20,
|
| 9 |
+
"num_attention_heads": 9,
|
| 10 |
+
"num_key_value_heads": 3,
|
| 11 |
+
"intermediate_size": 1536,
|
| 12 |
+
"max_position_embeddings": 2048,
|
| 13 |
+
"rms_norm_eps": 1e-05,
|
| 14 |
+
"rope_theta": 10000.0,
|
| 15 |
+
"torch_dtype": "float16",
|
| 16 |
+
"transformers_version": "4.45.0"
|
| 17 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5761e07f8e7fe770c67db71dc0189272d188a728a00596d78018334640372a7
|
| 3 |
+
size 179380816
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"eos_token": "<|endoftext|>",
|
| 5 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 6 |
+
"pad_token": "<|pad|>",
|
| 7 |
+
"tokenizer_class": "TokenizersBackend"
|
| 8 |
+
}
|