Instructions to use frissonlabs/script-parser-gemma3-270m-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use frissonlabs/script-parser-gemma3-270m-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'frissonlabs/script-parser-gemma3-270m-ONNX');
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Script Parser Gemma3 270M — ONNX
|
| 2 |
+
|
| 3 |
+
Fine-tuned [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it) for structured script/screenplay parsing.
|
| 4 |
+
|
| 5 |
+
Converts raw script text into pipe-delimited format:
|
| 6 |
+
- `D|CHARACTER|DIRECTION|Line of dialogue`
|
| 7 |
+
- `S|Scene heading text`
|
| 8 |
+
- `C|CHARACTER|M/F/U` (gender classification)
|
| 9 |
+
|
| 10 |
+
## Usage with transformers.js
|
| 11 |
+
|
| 12 |
+
```javascript
|
| 13 |
+
import { AutoTokenizer, AutoModelForCausalLM } from "@huggingface/transformers";
|
| 14 |
+
|
| 15 |
+
const tokenizer = await AutoTokenizer.from_pretrained("frissonlabs/script-parser-gemma3-270m-ONNX");
|
| 16 |
+
const model = await AutoModelForCausalLM.from_pretrained("frissonlabs/script-parser-gemma3-270m-ONNX", {
|
| 17 |
+
dtype: "q8",
|
| 18 |
+
device: "wasm", // or "webgpu"
|
| 19 |
+
});
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Model Details
|
| 23 |
+
|
| 24 |
+
- **Base model**: google/gemma-3-270m-it
|
| 25 |
+
- **Fine-tuning**: QLoRA r=32, 10,262 training examples, 3 epochs
|
| 26 |
+
- **Task**: Script/screenplay text → structured pipe-delimited format
|
| 27 |
+
- **Eval**: 98% format accuracy on held-out eval set
|
| 28 |
+
- **Export**: ONNX via optimum 2.1.0
|
| 29 |
+
|
| 30 |
+
## Files
|
| 31 |
+
|
| 32 |
+
- `onnx/model.onnx` — FP32 (1.6 GB)
|
| 33 |
+
- `onnx/model_q8.onnx` — INT8 quantized (417 MB)
|