SmolLM2 PG-style browser rewriter

This is the merged SmolLM2-1.7B SFT paragraph rewriter trained on the teacher rewrite corpus plus Paul Graham style anchors. It is packaged as an ONNX Runtime Web artifact so the model can be downloaded and executed in the user's browser with Transformers.js.

The weights were exported to ONNX FP16 and then converted to symmetric weight-only q4f16 MatMulNBits operators with block size 32. This is the browser runtime artifact; it is separate from the server-side AutoAWQ/GEMM checkpoint.

Browser usage

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.1/+esm";

const rewriter = await pipeline(
  "text-generation",
  "matthewagi/smollm2-pg-sft-browser-q4f16",
  { device: "webgpu", dtype: "q4f16" },
);

The first load downloads roughly 1.1 GB and then the browser caches the model. WebGPU is recommended; a WASM CPU fallback is possible but substantially slower. No inference server is required.

The base model is released under its upstream license. The SFT data and adapter are project artifacts; consult the project repository for provenance.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for matthewagi/smollm2-pg-sft-browser-q4f16-sym32

Quantized
(113)
this model