Send one prompt to both models
This page loads two small language models with
Transformers.js and runs the
same prompt through each. They are a matched pair: SmolLM2-135M
is a base model — trained only to predict the next token —
and SmolLM2-135M-Instruct is the instruction fine-tuned
version, trained further from that exact base model on instruction/response pairs.
Same architecture, same size, same pretraining; the only difference is the fine-tuning.
Both run on-device via WebAssembly.
Preparing to load models…
Comparison
SmolLM2-135M
onnx-community/SmolLM2-135M-ONNX — ~135M params
Base-model continuation will appear here.
Receives the raw prompt and simply continues the text. It was never taught that a prompt might be a request.
SmolLM2-135M-Instruct
HuggingFaceTB/SmolLM2-135M-Instruct — ~135M params
Instruction-tuned response will appear here.
Receives the prompt wrapped in a chat template and replies as an assistant, because it was fine-tuned on instruction/response pairs.