SmolLM2-135M-Coder-v1: Ultra-Compact Low-Latency Edge Coding Specialist

Lead Architect: Bhavanam Rajendra Reddy (Runtime-Slayers | ORCID: 0009-0005-3349-1162)
Organization: Runtime-Slayers
Parameter Footprint: 134,516,736 (~135 Million Parameters)
Hardware & Memory Footprint: ~270 MB (FP16) / ~135 MB (INT8 / GGUF)
Base Architecture: SmolLM2-135M (Llama-style architecture, 30 Layers, 576 Hidden Dimension, 3 Key-Value Heads, 8k Context Window)
Surgical Weight Surgery: Subspace Null-Space Rank-1 Model Editing on Down-Projection MLPs ($\Delta W \cdot V_{\text{base}} = 0$)


1. Overview & Capabilities

SmolLM2-135M-Coder-v1 is an ultra-lightweight, edge-deployable Small Language Model (SLM) optimized for near-zero latency code generation, syntax validation, and algorithmic matrix calculations. Designed to run on microcontrollers, embedded robotics, and edge gateways (Raspberry Pi, Jetson Nano, WebAssembly).

Key Features:

  • Sub-50ms Inference Latency: Runs at >120 tokens/second on edge CPU.
  • Micro-Memory Footprint: Under 300MB RAM requirement.
  • Syntax Grounding: Specially edited for clean Python, MATLAB, and G-Code routines.

2. Quickstart Inference Example

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "BRR1154/SmolLM2-135M-Coder-v1"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float32,
    device_map="auto"
)

prompt = "Write a vectorized Python function using NumPy to compute the Euclidean distance matrix between two sets of points."
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)

outputs = model.generate(inputs, max_new_tokens=256, temperature=0.1)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))


πŸ“Š Empirical Academic Benchmarks & Evaluation Realities

1. Measured Academic Benchmarks (lm-eval v0.4.13 on CPU):

Benchmark Task Focus Sample Size Raw Accuracy Normalized (acc_norm) Standard Error Real-World Takeaway
ARC-Easy Elementary grade science QA 50 50.0% (25/50) 44.0% $\pm 7.14%$ Moderate baseline matching base SmolLM2.
ARC-Challenge Multi-hop complex scientific deduction 50 26.0% (13/50) 26.0% $\pm 6.27%$ Near random 4-choice guess baseline (25%).
HellaSwag Situational continuation 50 44.0% (22/50) 44.0% $\pm 7.09%$ Typical for ultra-compact 135M architectures.
OpenBookQA Multi-hop open-book facts 50 16.0% (8/50) 38.0% $\pm 6.93%$ Below random baseline on raw accuracy.
WinoGrande Coreference ambiguity resolution 50 52.0% (26/50) 52.0% $\pm 7.14%$ Near 50% binary choice baseline.

2. Official Foundation Baselines (SmolLM2-135M-Instruct Technical Report, 2024):

  • MMLU (5-shot): 25.8% (barely above 25% random baseline)
  • GSM8K (8-shot Math): 8.3% (arithmetic reasoning requires external tools)
  • HumanEval (Pass@1, Python): 22.0%

3. Real Codebase Comprehension & Ambiguity Limitations:

  • Repository Architecture Comprehension: 42.17 / 100 (Tested on real scientific codebases new_planet_identification and Bio-Sync-AI).
  • Ambiguity & Clarification Stress Test: 0.0 / 8.0 (0%). When presented with ambiguous deployment requests without credentials, the 135M parameter capacity defaults to emitting code completions rather than recognizing missing information and asking for clarification.
  • Architectural Role: This model functions as an ultra-compact, low-latency, deterministic syntax and token emitter (sub-50ms inference on edge CPU). High-level cognitive arbitration and multi-hop reasoning are delegated to larger models or closed-loop execution harnesses.

3. Citation

@misc{reddy2026smollmcoder,
  author = {Reddy, Bhavanam Rajendra},
  title = {SmolLM2-135M-Coder-v1: Ultra-Compact Edge Coding Specialist},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\\url{https://huggingface.co/BRR1154/SmolLM2-135M-Coder-v1}}
}
Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for BRR1154/SmolLM2-135M-Coder-v1

Finetuned
(411)
this model