Script Parser 360M (ONNX)

Fine-tuned SmolLM2-360M-Instruct for theatrical script parsing. Converts raw script text into pipe-delimited D|CHARACTER|parenthetical|line and S|stage direction format.

Usage with transformers.js

import { AutoTokenizer, AutoModelForCausalLM } from "@huggingface/transformers";

const tokenizer = await AutoTokenizer.from_pretrained("frissonlabs/script-parser-360m-ONNX");
const model = await AutoModelForCausalLM.from_pretrained("frissonlabs/script-parser-360m-ONNX", {
    dtype: "q4f16",
    device: "wasm",  // or "webgpu"
});

Input/Output Format

Input (raw script text):

JOHN. (Crossing to the window.) I can't believe you said that.
Mary. I didn't say anything!
(The phone rings.)

Output (pipe-delimited):

D|JOHN|Crossing to the window.|I can't believe you said that.
D|MARY||I didn't say anything!
S|The phone rings.
Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support