Text Generation
Safetensors
GGUF
English
picolm_v3
picolm
slm
on-device
custom_code
causal-lm
conversational
Instructions to use aethertp/PicoLM-V3-82M-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-V3-82M-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-V3-82M-Instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
Use Docker
docker model run hf.co/aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use aethertp/PicoLM-V3-82M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aethertp/PicoLM-V3-82M-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-V3-82M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
- Ollama
How to use aethertp/PicoLM-V3-82M-Instruct with Ollama:
ollama run hf.co/aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use aethertp/PicoLM-V3-82M-Instruct with Docker Model Runner:
docker model run hf.co/aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
- Lemonade
How to use aethertp/PicoLM-V3-82M-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aethertp/PicoLM-V3-82M-Instruct:Q4_K_M
Run and chat with the model
lemonade run user.PicoLM-V3-82M-Instruct-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -14,26 +14,69 @@ pipeline_tag: text-generation
|
|
| 14 |
|
| 15 |
# PicoLM-V3-82M-Instruct
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
##
|
| 20 |
|
| 21 |
-
|
| 22 |
-
- **Architecture:** 21 physical transformer blocks with a 2-pass macro loop (42 effective layers), SwiGLU activations, RMSNorm, and factorized linear embeddings ($24,576 \rightarrow 128 \rightarrow 576$).
|
| 23 |
-
- **Context Length:** 2,048 tokens native context window with standard RoPE.
|
| 24 |
-
- **Training Tokens:** Pre-trained on ~758 Million tokens of diverse web and educational data (FineWeb-Edu, Cosmopedia, Python-Edu, TriviaQA), followed by a curated 4-pillar SFT alignment (Code, Science, GSM8K, Everyday Chat).
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Quickstart & Usage
|
| 39 |
|
|
@@ -51,24 +94,44 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 51 |
device_map="auto"
|
| 52 |
)
|
| 53 |
|
| 54 |
-
messages = [
|
|
|
|
|
|
|
| 55 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 56 |
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
|
| 57 |
|
| 58 |
with torch.no_grad():
|
| 59 |
outputs = model.generate(
|
| 60 |
**inputs,
|
| 61 |
-
max_new_tokens=
|
| 62 |
do_sample=False,
|
| 63 |
use_cache=False,
|
| 64 |
eos_token_id=2
|
| 65 |
)
|
| 66 |
|
| 67 |
-
|
|
|
|
| 68 |
```
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
- **
|
| 73 |
-
- **Language:**
|
| 74 |
-
- **Decontamination:** Training
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# PicoLM-V3-82M-Instruct
|
| 16 |
|
| 17 |
+
<p align="center">
|
| 18 |
+
<b>PicoLM Project</b> • Ultra-Compact 82.2M On-Device Language Model
|
| 19 |
+
</p>
|
| 20 |
|
| 21 |
+
## Overview
|
| 22 |
|
| 23 |
+
**PicoLM-V3-82M-Instruct** is an ultra-compact, 82.2-million parameter causal language model designed specifically for edge devices, microcontrollers, and low-latency local inference. Developed entirely from scratch within the open-source **PicoLM Project**, it combines recurrent weight-tied transformer blocks with factorized low-rank linear embeddings to maximize knowledge density per parameter.
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
PicoLM-V3 Standard is specialized for **natural dialogue, commonsense reasoning, and concise daily interactions** within a native 2,048-token context window.
|
| 26 |
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## Model Specifications
|
| 30 |
+
|
| 31 |
+
| Attribute | Specification |
|
| 32 |
+
| :--- | :--- |
|
| 33 |
+
| **Total Parameters** | 82,233,792 unique parameters (tied I/O embeddings, 0 dead weights) |
|
| 34 |
+
| **Physical Transformer Blocks** | 21 layers |
|
| 35 |
+
| **Effective Layers (Recurrent Pass)** | 42 effective layers ($21 \times 2$ macro-loop passes) |
|
| 36 |
+
| **Hidden Dimension ($d_{\text{model}}$)** | 576 |
|
| 37 |
+
| **Attention Architecture** | Grouped-Query Attention (9 Query Heads, 3 KV Heads; GQA 3:1) |
|
| 38 |
+
| **Head Dimension ($d_{\text{head}}$)** | 64 |
|
| 39 |
+
| **Feed-Forward Dimension ($d_{\text{ffn}}$)** | 1,664 (SwiGLU activation) |
|
| 40 |
+
| **Factorized Embedding Projection** | $24,576 \rightarrow 128 \rightarrow 576$ (Rank-128 linear bottleneck) |
|
| 41 |
+
| **Normalization** | Pre-LN RMSNorm ($\epsilon = 10^{-5}$) with split-pass independent gains |
|
| 42 |
+
| **Positional Encoding** | Rotary Position Embeddings (RoPE, $\theta = 10,000.0$) |
|
| 43 |
+
| **Context Length** | 2,048 tokens native sequence length |
|
| 44 |
+
| **Vocabulary Size** | 24,576 BPE tokens |
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Evaluation & Benchmark Comparisons
|
| 49 |
+
|
| 50 |
+
All models evaluated strictly using the **EleutherAI LM-Evaluation-Harness** standard (character-length normalized log-likelihood scoring for multiple-choice tasks, exact match continuation):
|
| 51 |
+
|
| 52 |
+
| Model | Parameters | Training Tokens | ARC-Easy (`acc_norm`) | ARC-Challenge (`acc_norm`) | PIQA (`acc_norm`) | HellaSwag (`acc_norm`) |
|
| 53 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 54 |
+
| **PicoLM-V3 (Standard)** | **82.2M** | **758M** | **39.32%** | **23.63%** | **58.49%** | **36.00%** |
|
| 55 |
+
| PicoLM-V2.1-Instruct | 81.9M | ~380M | ~28.0% | ~22.5% | ~56.5% | ~32.0% |
|
| 56 |
+
| GPT-2 (OpenAI) | 124M | ~10B | 31.40% | 22.10% | 62.80% | 31.50% |
|
| 57 |
+
| MobileLLM-125M (Meta) | 125M | 1.0T | 43.90% | 27.10% | 65.30% | 38.90% |
|
| 58 |
+
| SmolLM-135M (Hugging Face) | 135M | 600B | 43.20% | 28.50% | 67.20% | 41.20% |
|
| 59 |
+
| SmolLM2-135M (Hugging Face)| 135M | 2.0T | 43.90% | 30.20% | 68.40% | 42.10% |
|
| 60 |
+
|
| 61 |
+
> **Compute-Efficiency Note:** While competitors such as SmolLM2 and MobileLLM were trained on **600 Billion to 2 Trillion tokens** (>1,000× more compute), PicoLM-V3 achieves competitive commonsense reasoning (HellaSwag 36.00%, PIQA 58.49%) using only **758 Million tokens** on community compute.
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## Pre-Training & SFT Pipeline
|
| 66 |
|
| 67 |
+
### 1. Pre-Training (Part B - 758M Tokens)
|
| 68 |
+
- **Data Mixture:** Cosmopedia v2, FineWeb-Edu (score $\ge 4$), Python-Edu, and curated synthetic QA.
|
| 69 |
+
- **Optimization:** AdamW ($\beta_1=0.9, \beta_2=0.95$, weight decay 0.1), Cosine decay schedule to $1.0 \times 10^{-5}$, FP16 mixed precision.
|
| 70 |
+
|
| 71 |
+
### 2. Four-Pillar Supervised Fine-Tuning (SFT-Gold)
|
| 72 |
+
Aligned over 9,796 strictly filtered instruction conversations with assistant-only loss masking:
|
| 73 |
+
1. **Python Algorithmic Code (3,000 samples):** Clean Python functions covering sorting, string manipulation, and list algorithms.
|
| 74 |
+
2. **Natural Science & Trivia (2,500 samples):** Un-templated, direct QA on general facts and physical sciences.
|
| 75 |
+
3. **Reasoning Proofs (2,000 samples):** Step-by-step math problems formatted with `<thought>` scratchpads.
|
| 76 |
+
4. **Natural Everyday Conversation (2,200 samples):** Multi-turn chitchat, greetings, and assistant interaction etiquette.
|
| 77 |
+
5. **Anti-Sycophancy & Boundary Anchors (140 samples):** Strict model identity assertions, polite refusals of impossible future predictions.
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
|
| 81 |
## Quickstart & Usage
|
| 82 |
|
|
|
|
| 94 |
device_map="auto"
|
| 95 |
)
|
| 96 |
|
| 97 |
+
messages = [
|
| 98 |
+
{"role": "user", "content": "There are 5 baskets. Each basket contains 6 pears. If 4 pears rot, how many good pears are left?"}
|
| 99 |
+
]
|
| 100 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 101 |
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
|
| 102 |
|
| 103 |
with torch.no_grad():
|
| 104 |
outputs = model.generate(
|
| 105 |
**inputs,
|
| 106 |
+
max_new_tokens=80,
|
| 107 |
do_sample=False,
|
| 108 |
use_cache=False,
|
| 109 |
eos_token_id=2
|
| 110 |
)
|
| 111 |
|
| 112 |
+
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 113 |
+
print(response.strip())
|
| 114 |
```
|
| 115 |
|
| 116 |
+
---
|
| 117 |
+
|
| 118 |
+
## Limitations & Ethical Considerations
|
| 119 |
|
| 120 |
+
- **Scale Constraints:** At 82.2M parameters, complex multi-step mental arithmetic without external scratchpads or tool access can hallucinate calculation steps.
|
| 121 |
+
- **Language Coverage:** The model is optimized strictly for English text and code.
|
| 122 |
+
- **Decontamination:** Training datasets were not decontaminated against benchmark test sets.
|
| 123 |
+
- **No Native Tool Use:** Cannot browse the web or execute live code.
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
## Citation
|
| 128 |
+
|
| 129 |
+
```bibtex
|
| 130 |
+
@misc{picolm2026v3,
|
| 131 |
+
author = {Emre Polat and PicoLM Project Contributors},
|
| 132 |
+
title = {PicoLM-V3: Efficient Sub-100M On-Device Language Modeling},
|
| 133 |
+
year = {2026},
|
| 134 |
+
publisher = {Hugging Face},
|
| 135 |
+
howpublished = {\url{https://huggingface.co/aethertp/PicoLM-V3-82M-Instruct}}
|
| 136 |
+
}
|
| 137 |
+
```
|