text-generation · Base Pretrained LlamaForCausalLM (360M · 4T tokens) · q8 · WASM · 366.64 MB · Apache-2.0

SmolLM2-360M (Base Continuation Model)

Hugging Face's SmolLM2-360M (HuggingFaceTB/SmolLM2-360M, exported to onnx-community/SmolLM2-360M-ONNX, 366.64 MB q8 ONNX) is the base pretrained continuation model trained on 4T tokens of FineWeb-Edu, DCLM, The Stack, and math — distinct from SFT/DPO-tuned SmolLM2-360M-Instruct and SmolLM2-135M-Instruct. It excels at document, code, log, and few-shot template completion 100% locally in CPU WebAssembly.

Runs in browser · WASM text-generation 366.64 MB q8 ONNX Apache-2.0 LlamaForCausalLM · 32L · GQA 15/5 Base Pretrained (Not -Instruct)

1 · On-device model (366.64 MB q8 WASM · 363.12 MB weights + 3.53 MB tokenizer & configs)

2 · Live Base Continuation Studio

Pick a base-LM preset (encyclopedic prose, Python stub, 2-shot JSON extraction, structured logs, or raw chat trap), type your own prefix, or drop/upload a .txt, .md, .json, or .csv file.

Curated base-model presets (Prose, Python, Few-Shot JSON, Logs & Raw Chat Trap)
Drop a .txt, .md, .json, or .csv prefix file here, paste via Ctrl/Cmd+V, or choose a local file:
0 chars

Live Streaming Continuation

Waiting for run
Prepare SmolLM2-360M above and click Continue Prompt to stream tokens locally on CPU WebAssembly.

Prepare SmolLM2-360M above to stream base-model continuations in CPU WebAssembly.

Latency · 1st tok—
Throughput—
Tokens (in → out)—
Entropy · Perplexity—
Loop check—
Backend · dtypeWASM · q8
NaN count—

3 · See Inside: Next-Token Logits, Perplexity & GPT2-BPE Subwords

One real forward pass (pipe.model(enc)) over your prefix yields raw logits across all 49,152 vocabulary entries. Inspect the exact softmax probability bars, Shannon entropy (bits), perplexity (exp(H)), and byte-level GPT2-BPE subwords (Ġ space / Ċ newline markers).

Top-12 Next-Token Candidates

—
Run continuation or click Inspect Next-Token Logits to view real probabilities.

GPT2-BPE Prompt Subwords (49,152 vocab)

—

Waiting for first on-device run.

4 · At a Glance, Base vs Instruct, Code & Use-Case Ladder

Upstream model HuggingFaceTB/SmolLM2-360M (4T pretraining tokens: FineWeb-Edu, DCLM, The Stack, Math; HellaSwag 54.5, ARC 53.0, PIQA 71.7)
Browser ONNX repo onnx-community/SmolLM2-360M-ONNX (onnx/model_quantized.onnx 363.12 MB + tokenizer.json 3.52 MB + configs = 366.64 MB q8)
Pipeline task & runtime text-generation · @huggingface/transformers@3.7.5 (shared pin in lib/webai.js) · CPU WASM
Architecture LlamaForCausalLM (32 layers, hidden_size=960, intermediate_size=2560, 15 Q / 5 KV GQA heads, head_dim=64, max_position_embeddings=8192, vocab_size=49152)
Special tokens bos=<|endoftext|> (0), eos=<|endoftext|> (0), GPT2Tokenizer byte-level BPE (no active SFT chat template)
License Apache-2.0 (HuggingFaceTB)
Show the code — Off-main-thread LlamaForCausalLM base continuation, TextStreamer & NaN telemetry
Show the code — Exact 49,152-vocab softmax, Shannon entropy (bits) & perplexity calculation

Explore the 5-Route SmolLM2-360M Base Use-Case Ladder