Instructions to use matthewagi/smollm2-pg-sft-browser-q4f16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use matthewagi/smollm2-pg-sft-browser-q4f16 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'matthewagi/smollm2-pg-sft-browser-q4f16');
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 weight-only
q4f16 MatMulNBits operators with block size 128. 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
- 23
Model tree for matthewagi/smollm2-pg-sft-browser-q4f16
Base model
HuggingFaceTB/SmolLM2-1.7B